Phoenix node problem after installation

Hi! Tried to install Phoenix on Manjaro for the first time using installation page. After installation If I don’t use flag --no-webpack, I meet

[info] Running TeacherWeb.Endpoint with cowboy 2.9.0 at 0.0.0.0:4000 (http)
[error] Could not start Node.js watcher because script "/home/pilot/Programs/webpunk/teacher/assets/node_modules/webpack/bin/webpack.js" does not exist. Your Phoenix application is still running, however assets won't be compiled. You may fix this by running "npm install" inside the "assets" directory.

If I run

npm install

in …/assets

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/pilot/Programs/webpunk/teacher/assets/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /home/pilot/.nvm/versions/node/v16.2.0/bin/node /home/pilot/Programs/webpunk/teacher/assets/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: Entering directory '/home/pilot/Programs/webpunk/teacher/assets/node_modules/node-sass/build'

logs here
I have no clue after two days trying to fix that.

Hello and welcome,

Maybe try to replace node-sass by sass in your assets.

cd assets
npm uninstall node-sass
npm i -D sass

Which version of Phoenix are You using?

Hi, thanks for answer and sorry for a late reply. My Phoenix version is 1.5.9. I’ve used your suggestion and gained new error Error: Node Sass version 6.0.0 is incompatible with ^4.0.0. Server is working but webpage looks terrible like html is broken.

what is the node version? node 14 and phoenix 1.5 should be ok.

Node version is v16.2.0

try downgrading to 14.

I’d recommend GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.

I had similar issues using node v16 with Phoenix. v14 and v15 should be ok, though.

with 14 I have no issues, while I had some trouble with 15 (can’t remember what exactly went wrong)