hi
Linux 29~20.04.1-Ubuntu, Docker version 20.10.12, build e91ed57
i run a php image and install latest nodejs v17 inside it
i enter inside my container as root with command like this :
sudo docker exec -u root -t -i 6634681df637 /bin/bash
inside my container, i enter in my /var/www folder then enter this command :
npx @vue/cli create ais-ecommerce-demo-app
from the official algolia documentation Getting started with Vue InstantSearch | Algolia
here the command and error below :
npx @vue/cli create ais-ecommerce-demo-app
ERROR Error saving preferences: make sure you have write access to /root/.vuerc.
(EACCES: permission denied, open '/root/.vuerc')
Vue CLI v4.5.15
? Please pick a preset: Default ([Vue 2] babel, eslint)
Vue CLI v4.5.15
✨ Creating project in /var/www/ais-ecommerce-demo-app.
🗃 Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /root/.npm/_cacache/tmp
npm ERR! errno EACCES
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/root/.npm"
i already tried chown, chmod 777, but i am root, why the command failed, and how to resolve this issue ?
best regards