Hi, I’ve tried to create a new phoenix project using phx.new, with standard options in a Mac running Mac OS Catalina, configured with brew but it is failing to run web
> brew info elixir
> elixir: stable 1.11.2 (bottled), HEAD
>
> mix --version
> Erlang/OTP 23 [erts-11.1.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] [dtrace]
>
> Mix 1.11.2 (compiled with Erlang/OTP 23)
>
> New:
> phx_new 1.5.6
The results I get are these:
> % cd assets && npm install && node node_modules/webpack/bin/webpack.js --mode development
>
> up to date, audited 894 packages in 2s
>
> 42 packages are looking for funding
> run `npm fund` for details
>
> found 0 vulnerabilities
> [hardsource:09b651e9] Writing new cache 09b651e9...
> [hardsource:09b651e9] Tracking node dependencies with: package-lock.json.
> Hash: 4562ebd594bb91c502e3
> Version: webpack 4.41.5
> Time: 643ms
> Built at: 11/07/2020 10:33:40 AM
> Asset Size Chunks Chunk Names
> ../favicon.ico 1.23 KiB [emitted]
> ../images/phoenix.png 13.6 KiB [emitted]
> ../robots.txt 202 bytes [emitted]
> app.js 16 KiB app [emitted] app
> Entrypoint app = app.js
> [0] multi ./js/app.js 28 bytes {app} [built]
> [../deps/phoenix_html/priv/static/phoenix_html.js] 2.21 KiB {app} [built]
> [./css/app.scss] 2.65 KiB {app} [built] [failed] [1 error]
> [./js/app.js] 490 bytes {app} [built]
>
> ERROR in ./css/app.scss
> Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
> ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
> Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
> For more information on which environments are supported please see:
> https://github.com/sass/node-sass/releases/tag/v4.14.1
> at module.exports (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/binding.js:13:13)
> at Object.<anonymous> (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/index.js:14:35)
> at Module._compile (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
> at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
> at Module.load (node:internal/modules/cjs/loader:948:32)
> at Function.Module._load (node:internal/modules/cjs/loader:789:14)
> at Module.require (node:internal/modules/cjs/loader:972:19)
> at require (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
> at getDefaultSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getDefaultSassImplementation.js:24:10)
> at getSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getSassImplementation.js:19:72)
> at Object.loader (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/index.js:40:61)
> at /Users/sergio/workspace/Phoenix/test/assets/node_modules/webpack/lib/NormalModule.js:316:20
> at /Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
> at /Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
> at runSyncOrAsync (/Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
> at iterateNormalLoaders (/Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
> at Array.<anonymous> (/Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
> at Storage.finished (/Users/sergio/workspace/Phoenix/test/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
> at /Users/sergio/workspace/Phoenix/test/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
> at /Users/sergio/workspace/Phoenix/test/assets/node_modules/graceful-fs/graceful-fs.js:123:16
> at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:63:3)
> @ ./js/app.js 4:0-25
> @ multi ./js/app.js
> Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!css/app.scss:
> Entrypoint mini-css-extract-plugin = *
> [./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss] 1.44 KiB {mini-css-extract-plugin} [built] [failed] [1 error]
>
> ERROR in ./css/app.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss)
> Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
> Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
> For more information on which environments are supported please see:
> https://github.com/sass/node-sass/releases/tag/v4.14.1
> at module.exports (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/binding.js:13:13)
> at Object.<anonymous> (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/index.js:14:35)
> at Module._compile (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
> at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
> at Module.load (node:internal/modules/cjs/loader:948:32)
> at Function.Module._load (node:internal/modules/cjs/loader:789:14)
> at Module.require (node:internal/modules/cjs/loader:972:19)
> at require (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
> at getDefaultSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getDefaultSassImplementation.js:24:10)
> at getSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getSassImplementation.js:19:72)
> at Object.loader (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/index.js:40:61)
And css is not shown properly. I can see this error in the console
% mix phx.server
[info] Running TestWeb.Endpoint with cowboy 2.8.0 at 0.0.0.0:4000 (http)
[info] Access TestWeb.Endpoint at http://localhost:4000webpack is watching the files…
[hardsource:e1c5cec4] Using 1 MB of disk space.
[hardsource:e1c5cec4] Writing new cache e1c5cec4…
[hardsource:e1c5cec4] Tracking node dependencies with: package-lock.json.
Hash: 4562ebd594bb91c502e3
Version: webpack 4.41.5
Time: 455ms
Built at: 11/07/2020 10:34:38 AM
Asset Size Chunks Chunk Names
…/favicon.ico 1.23 KiB [emitted]
…/images/phoenix.png 13.6 KiB [emitted]
…/robots.txt 202 bytes [emitted]
app.js 16 KiB app [emitted] app
Entrypoint app = app.js
[0] multi ./js/app.js 28 bytes {app} [built]
[…/deps/phoenix_html/priv/static/phoenix_html.js] 2.21 KiB {app} [built]
[./css/app.scss] 2.65 KiB {app} [built] [failed] [1 error]
[./js/app.js] 490 bytes {app} [built]ERROR in ./css/app.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
Release v4.14.1 · sass/node-sass · GitHub
at module.exports (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/binding.js:13:13)
at Object. (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Module.require (node:internal/modules/cjs/loader:972:19)
at require (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at getDefaultSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getDefaultSassImplementation.js:24:10)
at getSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getSassImplementation.js:19:72)
at Object.loader (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/index.js:40:61)
at /Users/sergio/workspace/Phoenix/test/assets/node_modules/webpack/lib/NormalModule.js:316:20
at /Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at runSyncOrAsync (/Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
at iterateNormalLoaders (/Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array. (/Users/sergio/workspace/Phoenix/test/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/Users/sergio/workspace/Phoenix/test/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /Users/sergio/workspace/Phoenix/test/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /Users/sergio/workspace/Phoenix/test/assets/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:63:3)
@ ./js/app.js 4:0-25
@ multi ./js/app.js
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!css/app.scss:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss] 1.44 KiB {mini-css-extract-plugin} [built] [failed] [1 error]ERROR in ./css/app.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss) Module build failed (from ./node_modules/sass-loader/dist/cjs.js): Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.14.1 at module.exports (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/binding.js:13:13) at Object.<anonymous> (/Users/sergio/workspace/Phoenix/test/assets/node_modules/node-sass/lib/index.js:14:35) at Module._compile (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10) at Module.load (node:internal/modules/cjs/loader:948:32) at Function.Module._load (node:internal/modules/cjs/loader:789:14) at Module.require (node:internal/modules/cjs/loader:972:19) at require (/Users/sergio/workspace/Phoenix/test/assets/node_modules/v8-compile-cache/v8-compile-cache.js:159:20) at getDefaultSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getDefaultSassImplementation.js:24:10) at getSassImplementation (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/getSassImplementation.js:19:72) at Object.loader (/Users/sergio/workspace/Phoenix/test/assets/node_modules/sass-loader/dist/index.js:40:61)
Any idea on how to fix this. I’ve tried to bump the versions of packages in npm, but I start to get problmems with the configuration. Updating webpack to 5 breaks a lot of things, and every combination of versions creates one error or another.
Any help would be appreciated. I abandoned development when I couldn’t run phoenix in Kubernetes and now it seems to be working, so I want to give it a try again.