npm -v
6.3.0
node -v
v6.14.3
node -p process.versions
{ http_parser: '2.8.0',
node: '6.14.3',
v8: '5.1.281.111',
uv: '1.22.0',
zlib: '1.2.11',
ares: '1.14.0',
icu: '62.1',
modules: '48',
napi: '3',
openssl: '1.0.2k-freebsd' }
node -p process.platform
freebsd
node -p process.arch
x64
...
> [email protected] install /usr/home/ateam-local/foreman/node_modules/node-sass
> node scripts/install.js
Unable to save binary /usr/home/ateam-local/foreman/node_modules/node-sass/vendor/freebsd-x64-48 : { Error: EACCES: permission denied, mkdir '/usr/home/ateam-local/foreman/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.mkdirSync (fs.js:932:18)
at sync (/usr/home/ateam-local/foreman/node_modules/mkdirp/index.js:71:13)
at Function.sync (/usr/home/ateam-local/foreman/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/usr/home/ateam-local/foreman/node_modules/node-sass/scripts/install.js:114:11)
at Object.<anonymous> (/usr/home/ateam-local/foreman/node_modules/node-sass/scripts/install.js:157:1)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/home/ateam-local/foreman/node_modules/node-sass/vendor' }
> [email protected] install /usr/home/ateam-local/foreman/node_modules/node-sass
> node scripts/install.js
Unable to save binary /usr/home/ateam-local/foreman/node_modules/node-sass/vendor/freebsd-x64-48 : { Error: EACCES: permission denied, mkdir '/usr/home/ateam-local/foreman/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.mkdirSync (fs.js:932:18)
at sync (/usr/home/ateam-local/foreman/node_modules/mkdirp/index.js:71:13)
at Function.sync (/usr/home/ateam-local/foreman/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/usr/home/ateam-local/foreman/node_modules/node-sass/scripts/install.js:114:11)
at Object.<anonymous> (/usr/home/ateam-local/foreman/node_modules/node-sass/scripts/install.js:157:1)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/home/ateam-local/foreman/node_modules/node-sass/vendor' }
Error: EACCES: permission denied, mkdir '/usr/home/ateam-local/foreman/node_modules/node-sass/vendor'
You need to fix your permissions. Make sure you're not running npm as sudo.
HI ALL,
Please add below command on your folder.
sudo npm install -g --unsafe-perm node-sass
it's working 100%.
@xzyfer make sure you are not using sudo ??
That's not intuitive (but you're right)
U may give permission to the user -
In linux - Ubuntu 18.04
ll -thr // to see the list of folders and there permissions.
sudo chown -R $USER:$USER ICICI_UI/ //To give permission to the user.
U may give permission to the user -
In linux - Ubuntu 18.04
ll -thr // to see the list of folders and there permissions.sudo chown -R $USER:$USER ICICI_UI/ //To give permission to the user.
This worked for me!!!
For those running into the issue with mkdir failure, please check if your user OWNS the node_modules folder by running the command ll. The fix for me was to simply run npm install on my project. DONT RUN AS SUDO. if you run as sudo it creates directories owned by root which cannot be used by your local user so the directories fail to create. I Hope this helps!!!!
HI ALL,
Please add below command on your folder.
sudo npm install -g --unsafe-perm node-sass
it's working 100%.
It works, thx!!
sudo npm install --unsafe-perm sass sass-loader node-sass wepy-compiler-sass
Most helpful comment
HI ALL,
Please add below command on your folder.
sudo npm install -g --unsafe-perm node-sass
it's working 100%.