I am running the following on NixOS:
$ npm install express-generator -g
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code EROFS
npm ERR! syscall mkdir
npm ERR! path /nix/store/vs43ydaw3k0pqa2z3s9mprqaymmbj66p-nodejs-16.16.0/lib/node_modules/express-generator
npm ERR! errno -30
npm ERR! rofs EROFS: read-only file system, mkdir '/nix/store/vs43ydaw3k0pqa2z3s9mprqaymmbj66p-nodejs-16.16.0/lib/node_modules/express-generator'
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-08-15T05_20_27_925Z-debug-0.log
It fails, and adding sudo doesn't help (isn't it saying read only):
$ sudo npm install express-generator -g
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code EROFS
npm ERR! syscall mkdir
npm ERR! path /nix/store/vs43ydaw3k0pqa2z3s9mprqaymmbj66p-nodejs-16.16.0/lib/node_modules/express-generator
npm ERR! errno -30
npm ERR! rofs EROFS: read-only file system, mkdir '/nix/store/vs43ydaw3k0pqa2z3s9mprqaymmbj66p-nodejs-16.16.0/lib/node_modules/express-generator'
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-08-15T05_21_40_353Z-debug-0.log
I want to run that command before running
express myapp
Thanks.