When i try to install this plugin i get the following error. How can i resolve this?
`> [email protected] install /Users/robert/code/bitscanapp/node_modules/node-sass
node scripts/install.js
module.js:487
throw err;
^
Error: Cannot find module 'safe-buffer'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/robert/.npm/_logs/2017-06-08T12_26_29_533Z-debug.log`
npm -v): 5.0.3node -v): v8.0.0Node Process (node -p process.versions):
{ http_parser: '2.7.0',
node: '8.0.0',
v8: '5.8.283.41',
uv: '1.11.0',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
openssl: '1.0.2k',
icu: '59.1',
unicode: '9.0',
cldr: '31.0.1',
tz: '2017b' }
Node Platform (node -p process.platform): darwin
node -p process.arch): x64node -p "require('node-sass').info"):npm ls node-sass):You need run npm install in the directory with your package.json.
npm install node-sass@^4
Of course, i allready did that. with the following result:
npm install node-sass@^4
npm WARN prefer global [email protected] should be installed with -g
[email protected] install /Users/robert/code/bitscanapp/node_modules/node-sass
node scripts/install.js
module.js:487
throw err;
^
Error: Cannot find module 'safe-buffer'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/robert/.npm/_logs/2017-06-08T12_40_53_674Z-debug.log
If was not clear because you ignored the issue template.
This is not a node-sass issue. It may be an issue with request or safe-buffer itself, but there is nothing we can do.
You can try running
npm ls safe-buffer
to confirm it was installed. This error could be result of file permissions or low disk space preventing npm doing the right thing.
Actually in my machine even delete global npm or uninstall node.js and install it agian but still not work.
so my solution is uninstall npm and go to delete folder npm and npm-cache in C:Users\pc-nameAppData\Roaming then install it again
I had this happen to me also. I deleted my package-lock and my node-module folder. Then npm install and it resolved itself. Just a thought since I didn't see any resolution for people who come across this and have a similar issue.
Same thing worked for me as well, Thanks @TLukeMcDonald, deleted the package-lock file,
but anyone knows the reason for that?
I had this happen to me also. I deleted my package-lock and my node-module folder. Then npm install and it resolved itself. Just a thought since I didn't see any resolution for people who come across this and have a similar issue.
This answer helped me install node-sass after permission errors. Would definitely recommend anybody viewing this thread to follow TLukeMcDonald's advise of deleting package-lock.json and node-modules folder before following Stack Overflow guides to edit permissions with chmod and chown
Is there a sane explanation for why this occurs with this dependency only? Is there a viable way to fix this for once and for all instead of upvoting workarounds (which seems to be very popular these days)? This error appears for me when installing on Heroku. It will be interesting to know as for WHY the module is not found.
Actually in my machine even delete global npm or uninstall node.js and install it agian but still not work.
so my solution is uninstall npm and go to delete folder npm and npm-cache in C:Users\pc-nameAppData\Roaming then install it again
Doest work for me. I was not able to uninstall it I just deleted the folder.
It still show
Done with error:
$ ./iobroker add ble --host DESKTOP-JOBC9U4(SmartHomeWiedemannAbello)
ERROR: C:\Program Files\iobroker\SmartHomeW
ERROR: iedemannAbellonode_modules\standard-as-callbackbuilt\index.js:6
throw e;
^
Error: Cannot find module 'safe-buffer'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.
ERROR: js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
ERROR: process exited with code 1
Most helpful comment
Actually in my machine even delete global npm or uninstall node.js and install it agian but still not work.
so my solution is uninstall npm and go to delete folder npm and npm-cache in C:Users\pc-nameAppData\Roaming then install it again