You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to install the npm onto the node container I'm getting a EACCES error in my log as well as the console denying permissions for other actions.
How to reproduce
Create docker-compose.yml file
docker compose up -d
docker exec -it {container_id} /bin/bash
npm install -g @jworkman-fs/wdv-cli
Screenshots
Screenshot # 1
Screenshot # 2
Screenshot # 3
Screenshot # 4
Full Error Backtrace
node@3eea8f316777:~/app$ npm install -g @jworkman-fs/wdv-cli
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/@jworkman-fs
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@jworkman-fs'
npm ERR! at async mkdir (node:internal/fs/promises:855:10)
npm ERR! at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:551:20
npm ERR! at async Promise.allSettled (index 0)
npm ERR! at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:251:11)
npm ERR! at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:170:5)
npm ERR! at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:152:5)
npm ERR! at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5)
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@jworkman-fs'
npm ERR! at async mkdir (node:internal/fs/promises:855:10)
npm ERR! at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:551:20
npm ERR! at async Promise.allSettled (index 0)
npm ERR! at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:251:11)
npm ERR! at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:170:5)
npm ERR! at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:152:5)
npm ERR! at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5) {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/@jworkman-fs'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in: /home/node/.npm/_logs/2024-01-23T22_18_49_257Z-debug-0.log
Any Other Notes
Research performed
I understand the problem is being caused by some sort of issues with the permissions granted to the node user. However, I encountered another error, that I can't understand, when using admin/root (see screenshot 2 and 3).
This is a list of Overflow threads and other websites I visited while trying to fix the problem:
Yesterday(2024/01/22), when following along with the activity I made the mistake of only starting a node docker container, I was able to install the package successfully (see screenshot 4) but because I forgot about mariadb, I couldn't perform the mysql commands. Today(2024/01/23), I tested this again on another node container and I got the same access errors.
The text was updated successfully, but these errors were encountered:
So the wdv-cli npm package was designed to be ran directly on the student's local install of NodeJS (not through Docker). This is because the commands available in the package are related to setting up a docker-compose.yml file on an existing project.
Issue Description
When attempting to install the npm onto the node container I'm getting a
EACCES
error in my log as well as the console denying permissions for other actions.How to reproduce
docker compose up -d
docker exec -it {container_id} /bin/bash
npm install -g @jworkman-fs/wdv-cli
Screenshots
Screenshot # 1
Screenshot # 2
Screenshot # 3
Screenshot # 4
Full Error Backtrace
Any Other Notes
Research performed
I understand the problem is being caused by some sort of issues with the permissions granted to the node user. However, I encountered another error, that I can't understand, when using admin/root (see screenshot 2 and 3).
This is a list of Overflow threads and other websites I visited while trying to fix the problem:
Docker-compose.yml
Notes
Yesterday(2024/01/22), when following along with the activity I made the mistake of only starting a node docker container, I was able to install the package successfully (see screenshot 4) but because I forgot about mariadb, I couldn't perform the mysql commands. Today(2024/01/23), I tested this again on another node container and I got the same access errors.
The text was updated successfully, but these errors were encountered: