How I got this error:
I got this error while running command: npm install
in one of my project directory located at /opt/lamoo/htdocs
What was the Error:
root@ip-ip-address:/opt/lampp/htdocs/[projectName]# npm install
] node-sass@4.13.1 install /opt/lampp/htdocs/[projectName]/node_modules/node-sass
] node scripts/install.js
Unable to save binary /opt/lampp/htdocs/[projectName]/node_modules/node-sass/vendor/linux-x64-72 : Error: EACCES: permission denied, mkdir '/opt/lampp/htdocs/[projectName]/node_modules/node-sass/vendor'
at Object.mkdirSync (fs.js:823:3)
at sync (/opt/lampp/htdocs/[projectName]/node_modules/mkdirp/index.js:71:13)
at Function.sync (/opt/lampp/htdocs/[projectName]/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/opt/lampp/htdocs/[projectName]/node_modules/node-sass/scripts/install.js:114:11)
at Object.anonymous
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) {
errno: -13,
syscall: 'mkdir',
code: 'EACCES',
path: '/opt/lampp/htdocs/[projectName]/node_modules/node-sass/vendor'
}
Solution:
Run sudo npm install
Thanks for reading, I hope you enjoyed the article.
- MyHospitalNow.com – PROD | Clean all patient user and related quote, bid and file data - March 21, 2020
- Sending Email with attachments in Laravel 5.5 using and PHP & JQuery - February 20, 2020
- How to run php artisan queue:listen in background on Ubuntu or Linux machine - February 6, 2020