snapdrop icon indicating copy to clipboard operation
snapdrop copied to clipboard

`npm i` error when use docker-compose up

Open abersheeran opened this issue 3 years ago • 3 comments

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

abersheeran avatar Nov 24 '22 09:11 abersheeran

I just exec docker-compose up -d.

After delete user: node in docker-compose.yaml, it's run.

abersheeran avatar Nov 24 '22 12:11 abersheeran

It means that you don't have permissions to install the modules

Crazypersonalph avatar Nov 30 '22 14:11 Crazypersonalph

This is still an issue. Following instructions in the docs leads to errors.

After delete user: node in docker-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.

axelsimon avatar Aug 23 '23 09:08 axelsimon