same as the title. I ran npm install as root but still getting permission error. what should I do? I never got into this type of situation. I tried chmod -R 777 *, chown nobody:nogroup -R * in the project folder but nothing has changed.
Here's the error
Error: Command failed: npm install http fs path passport passport-facebook express-session connect-redis redis express-param compression express-enforces-ssl helmet ms connect-multiparty passport-runkeeper underscore.string moment-timezone nodemailer-ses-transport stripe simple-onesignal sequelize underscore uuid strava-v3 multer sharp bluebird querystring node-libcurl --save
npm WARN deprecated graceful-fs#3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/bin/node',
node-pre-gyp verb cli '/Users/philipyoonshin_spryfit/spryfit-node/node_modules/node-libcurl/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli 'install',
node-pre-gyp verb cli '--fallback-to-build' ]
node-pre-gyp info using node-pre-gyp#0.6.36
node-pre-gyp info using node#8.9.4 | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/Users/philipyoonshin_spryfit/spryfit-node/node_modules/node-libcurl/lib/binding/node_libcurl.node" (not found)
node-pre-gyp http GET https://github.com/JCMais/node-libcurl/releases/download/v1.2.0/node_libcurl-v1.2.0-node-v57-darwin-x64.tar.gz
node-pre-gyp http 200 https://github.com/JCMais/node-libcurl/releases/download/v1.2.0/node_libcurl-v1.2.0-node-v57-darwin-x64.tar.gz
node-pre-gyp info install unpacking node_libcurl.node
node-pre-gyp info tarball done parsing tarball
node-pre-gyp info ok
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/philipyoonshin_spryfit/spryfit-node/node_modules/sharp/build'
gyp ERR! System Darwin 17.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/philipyoonshin_spryfit/spryfit-node/node_modules/sharp
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.18.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.18.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm always run post-install scripts with a non-privileged users for security reason. So even if you ran the command with sudo, the install scripts will be ran as non-privileged.
This is for obvious security reason, if npm wasn't downgrading the permissions, this means you'd be giving full control of your machine to any npm packages - some of those who might be malicious.
Related
Unable to run npm install in new cloned project in new windows 10 machine. please help me.
D:\folderpath\folderpath>npm install --legacy-peer-deps
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated babel#6.23.0: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers
npm WARN deprecated #types/googlemaps#3.30.18: Types for the Google Maps browser API have m oved to #types/google.maps. Note: these types are not for the googlemaps npm package, which is a Node API.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated react-intercom#1.0.15: Package no longer maintained. Use at your own risk.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated react-load-script#0.0.6: abandoned and unmaintained
npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated axios#0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js#1.2.7: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js#1.2.7: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js#2.6.12: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated #material-ui/core#4.12.3: You can now upgrade to #mui/material. See the guide: https://mui.com/guides/migration-v4/
npm ERR! code 1
npm ERR! path D:\folderpath\folderpath\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe D:\folderpath\folderpath\node_modules\node-gyp\bin\node-gyp.js rebuild
--verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'D:\\folderpath\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.13.2 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (D:\folderpath\folderpath\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (D:\folderpath\folderpath\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (D:\folderpath\folderpath\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (D:\folderpath\folderpath\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (D:\folderpath\folderpath\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (D:\folderpath\folderpath\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (D:\folderpath\folderpath\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (D:\folderpath\folderpath\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (D:\folderpath\folderpath\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (D:\folderpath\folderpath\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (D:\folderpath\folderpath\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (D:\folderpath\folderpath\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at D:\folderpath\folderpath\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (D:\folderpath\folderpath\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (D:\folderpath\folderpath\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (D:\folderpath\folderpath\node_modules\graceful-fs\polyfills.js:299:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\folderpath\\folderpath\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd D:\folderpath\folderpath\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\AppData\Local\npm-cache\_logs\2022-01-31T22_27_20_545Z-debug-0.log
npm --version 8.4.0
node -v v16.13.2
check python checking for Python executable "python2" in the PATH
need install python2 and add PATH
So I have been trying to reinstall my node-modules and for some reason I am encountering this error I have tried many things like npm i -g windows-build-tools and it did not work.
npm ERR! path C:\Quentin\Discordbot\node_modules\#discordjs\opus
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Acer\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Quentin\Discordbot\node_modules\#discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=C:\Quentin\Discordbot\node_modules\#discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.1.0
npm ERR! node-pre-gyp info using node#15.13.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "C:\Quentin\Discordbot\node_modules\#discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for #discordjs/opus#0.3.3 and node#15.13.0 (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz```
I've tried every solution on the web, besides he dangerous silver bullet chown -R solution to get vue.js up and running via the cli.
Supposedly, I don't have permission to manipulate the npm folder, but again I'm not too sure anymore.
In Terminal, I'm getting the error below. I've google searched the errors one by one, tried out some potential solutions but nothing worked.
What can I do to fix this?
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.4 and node#11.3.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64'
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/jamf/bin/jamf/node" "/usr/local/jamf/bin/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "clean"
gyp ERR! cwd /usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents
gyp ERR! node -v v11.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/jamf/bin/jamf/node /usr/local/jamf/bin/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/jamf/bin/jamf/node" "/usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents
node-pre-gyp ERR! node -v v11.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/jamf/bin/jamf/node /usr/local/jamf/bin/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
npm WARN #apollographql/apollo-upload-server#5.0.3 requires a peer of graphql#^0.13.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/#vue/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ #vue/cli#3.2.1
You can use the chown -R option. Because the folders it's trying to access were made by another proces, your user account is not the owner, and thus can't make changes there. When you use chown -R you just change the ownership of the folder to your user, not dangerous. I had to do it a couple of times for npm on my new laptop.
the command you would want to use is:
sudo chown <username> -R ./*
In folder: /usr/local/jamf/bin/lib i think, if that doesn't work, try going up one folder and use the same command there.
sudo npm install -g #vue/cli --unsafe-perm
See this vue-cli issue on GitHub
I'm trying to install a nodejs application in heroku but can not be deployed, because node-gyp rebuild of the base64 library. Any idea to solve this deploy issue.
Works ok locally, the issue is only deploying into heroku. Any ideas to solve it?
Gizras-iMac:negawatt-iec-scraper gizra$ git push heroku master
Fetching repository, done.
Counting objects: 76, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (49/49), 11.00 KiB | 0 bytes/s, done.
Total 49 (delta 37), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Node.js app detected
PRO TIP: Specify a node version in package.json
See https://devcenter.heroku.com/articles/nodejs-support
-----> Defaulting to latest stable node: 0.10.33
-----> Downloading and installing node
-----> Restoring node_modules directory from cache
-----> Pruning cached dependencies not specified in package.json
-----> Node version changed since last build; rebuilding dependencies
> base64#2.1.0 install /tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64
> node-gyp rebuild
make: Entering directory `/tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64/build'
CXX(target) Release/obj.target/base64/base64.o
SOLINK_MODULE(target) Release/obj.target/base64.node
SOLINK_MODULE(target) Release/obj.target/base64.node: Finished
COPY Release/base64.node
ACTION binding_gyp_after_build_target_symlink /tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64/base64.node
ln: creating symbolic link `/tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64/base64.node': File exists
make: *** [/tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64/base64.node] Error 1
make: Leaving directory `/tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/tmp/build_fc23248efe5a35c5b79d9762e3733365/vendor/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.8.11-ec2
gyp ERR! command "node" "/tmp/build_fc23248efe5a35c5b79d9762e3733365/vendor/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/build_fc23248efe5a35c5b79d9762e3733365/node_modules/base64
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! base64#2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the base64#2.1.0 install script.
npm ERR! This is most likely a problem with the base64 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls base64
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.11-ec2
npm ERR! command "/tmp/build_fc23248efe5a35c5b79d9762e3733365/vendor/node/bin/node" "/tmp/build_fc23248efe5a35c5b79d9762e3733365/vendor/node/bin/npm" "rebuild"
npm ERR! cwd /tmp/build_fc23248efe5a35c5b79d9762e3733365
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_fc23248efe5a35c5b79d9762e3733365/npm-debug.log
npm ERR! not ok code 0
Old question but I ran into this and solved it via a few routes:
Failed at the base64#2.1.0 install script
Here the base64#2.1.0 might not be compatible with your version of node running your project. Try to install an earlier version.
Delete the ~/.node-gyp folder on your computer (command spacebar and search for ~/.node-gyp) and try reinstalling node-gyp globally.
I am trying to do npm install on a project that requires 'ref' and I get this error. Any idea how can I correct this?
I have nvm runnning and node -v = 0.10.26
ref#0.1.3 install /root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES, mkdir '/root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref/build'
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! ref#0.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref#0.1.3 install script.
npm ERR! This is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls ref
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "node" "/root/.nvm/v0.10.26/bin/npm" "install" "ref"
npm ERR! cwd /root/node-ffi-libvirt/nodejs-usage/ffi-libvirt
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
This suggests you don't have permission to create a directory.
It looks like the original project was installed as root (implied by the /root in the path) - so you must run the install as root as well.
try mkdir '/root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref/build' with the user you are running the command from. Fix that first and then run your command.