snapdrop
snapdrop copied to clipboard
`npm i` error when use docker-compose up
node_1 | npm WARN old lockfile
node_1 | npm WARN old lockfile The package-lock.json file was created with an old version of npm,
node_1 | npm WARN old lockfile so supplemental metadata must be fetched from the registry.
node_1 | npm WARN old lockfile
node_1 | npm WARN old lockfile This is a one-time fix-up, please be patient...
node_1 | npm WARN old lockfile
node_1 | npm notice
node_1 | npm notice New major version of npm available! 8.19.2 -> 9.1.2
node_1 | npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.1.2>
node_1 | npm notice Run `npm install -g [email protected]` to update!
node_1 | npm notice
node_1 | npm ERR! code EACCES
node_1 | npm ERR! syscall mkdir
node_1 | npm ERR! path /home/node/app/node_modules
node_1 | npm ERR! errno -13
node_1 | npm ERR! Error: EACCES: permission denied, mkdir '/home/node/app/node_modules'
node_1 | npm ERR! [Error: EACCES: permission denied, mkdir '/home/node/app/node_modules'] {
node_1 | npm ERR! errno: -13,
node_1 | npm ERR! code: 'EACCES',
node_1 | npm ERR! syscall: 'mkdir',
node_1 | npm ERR! path: '/home/node/app/node_modules'
node_1 | npm ERR! }
node_1 | npm ERR!
node_1 | npm ERR! The operation was rejected by your operating system.
node_1 | npm ERR! It is likely you do not have the permissions to access this file as the current user
node_1 | npm ERR!
node_1 | npm ERR! If you believe this might be a permissions issue, please double-check the
node_1 | npm ERR! permissions of the file and its containing directories, or try running
node_1 | npm ERR! the command again as root/Administrator.
node_1 |
node_1 | npm ERR! A complete log of this run can be found in:
node_1 | npm ERR! /home/node/.npm/_logs/2022-11-24T09_54_01_394Z-debug-0.log
snapdrop_node_1 exited with code 243
I just exec docker-compose up -d.
After delete user: node in docker-compose.yaml, it's run.
It means that you don't have permissions to install the modules
This is still an issue. Following instructions in the docs leads to errors.
After delete
user: nodeindocker-compose.yaml, it's run.
For anyone wondering, this means to either comment out or entirely remove the line user: "node" in the docker-compose.yml file.