npm -v): 3.10.9node -v):v6.9.2node -p process.versions):node -p process.platform):linuxnode -p process.arch):x64node -p "require('node-sass').info"):Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at [eval]:1:1
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at Object.exports.runInThisContext (vm.js:77:17)
at Object.
at Module._compile (module.js:570:32)
at Immediate.
connelblaze@connelblaze:go_jessy$ npm ls node-sass
[email protected] /home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy
`-- UNMET DEPENDENCY node-sass@~4.7.2
npm ERR! missing: node-sass@~4.7.2, required by [email protected]
npm ERR! code 1
npm ls node-sass):Looks like you're using sudo. If so you need to use the --unsafe-perms flag
with npm install
On Wed., 13 Jun. 2018, 2:12 pm ConnelBLAZE, notifications@github.com
wrote:
>
- NPM version (npm -v): 3.10.9
- Node version (node -v):v6.9.2
- Node Process (node -p process.versions):
{ http_parser: '2.7.0',
node: '6.9.2',
v8: '5.1.281.88',
uv: '1.9.1',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '48',
openssl: '1.0.2j' }- Node Platform (node -p process.platform):linux
- Node architecture (node -p process.arch):x64
- node-sass version (node -p "require('node-sass').info"):
module.js:471
throw err;
^Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at [eval]:1:1
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at Object.exports.runInThisContext (vm.js:77:17)
at Object. ([eval]-wrapper:6:22)
at Module._compile (module.js:570:32)
at Immediate. (bootstrap_node.js:357:29)
connelblaze@connelblaze:go_jessy$ npm ls node-sass
[email protected] /home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy
`-- UNMET DEPENDENCY node-sass@~4.7.2npm ERR! missing: node-sass@~4.7.2, required by [email protected]
npm ERR! code 1
- npm node-sass versions (npm ls node-sass):
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2415, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWGJP5HKGCpaMs44-3krZEwyvuzBwks5t8QHDgaJpZM4UmE9w
.
i didn't use sudo, i just did npm install.
so i should do : npm install --unsafe-perms ??
I ran it that way it still throws error
You can try. The issue isn't node-sass it's npm so there isn't much we can
do.
On Wed., 13 Jun. 2018, 4:17 pm ConnelBLAZE, notifications@github.com
wrote:
i didn't use sudo, i just did npm install.
so i should do : npm install --unsafe-perms ??
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2415#issuecomment-396953937,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWDkuZIsKH25pef7Tmj3W8WsUw7Jgks5t8R8WgaJpZM4UmE9w
.
npm siad it's node
now node is saying it's npm
I'm not getting...
Can you provide a Gist with the install log. The above information just indicates that node-sass hasn't been installed at all.
I don't know, what's the name of the file where the install log will be?
If you run npm install and it fails it will list a file with the details steps. Our troubleshooting guide also explains how to test out the install to figure out if it is a project specific or machine issue https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#debugging-installation-issues
Currently it just appears that you never did the NPM install at all.
I've tried everything i know.
I've tried what i saw there. Don't know why it's failing
2018-06-15T19_40_14_500Z-debug.log
Honestly I have no idea what's going on. The below is from the log
2002 silly install [email protected]
2003 info lifecycle [email protected]~install: [email protected]
2004 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
2005 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy/node_modules/node-sass/node_modules/.bin:/home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy/node_modules/.bin:/home/connelblaze/google-cloud-sdk/bin:/usr/local/heroku/bin:/home/connelblaze/.rbenv/plugins/ruby-build/bin:/home/connelblaze/.rbenv/shims:/home/connelblaze/.rbenv/bin:/home/connelblaze/mongodb/mongodb-linux-x86_64-ubuntu1604-3.4.4/bin/:/home/connelblaze/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/connelblaze/android/android-sdk-linux/tools:/home/connelblaze/android/android-sdk-linux/platform-tools:/bin:/home/connelblaze/go/bin:/usr/local/go/bin://home/connelblaze/go/src
2006 verbose lifecycle [email protected]~install: CWD: /home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy/node_modules/node-sass
2007 silly lifecycle [email protected]~install: Args: [ '-c', 'node scripts/install.js' ]
2008 silly lifecycle [email protected]~install: Returned: code: 0 signal: null
2009 timing action:install Completed in 65885ms
...snip...
2031 silly postinstall [email protected]
2032 info lifecycle [email protected]~postinstall: [email protected]
2033 verbose lifecycle [email protected]~postinstall: unsafe-perm in lifecycle true
2034 verbose lifecycle [email protected]~postinstall: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy/node_modules/node-sass/node_modules/.bin:/home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy/node_modules/.bin:/home/connelblaze/google-cloud-sdk/bin:/usr/local/heroku/bin:/home/connelblaze/.rbenv/plugins/ruby-build/bin:/home/connelblaze/.rbenv/shims:/home/connelblaze/.rbenv/bin:/home/connelblaze/mongodb/mongodb-linux-x86_64-ubuntu1604-3.4.4/bin/:/home/connelblaze/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/connelblaze/android/android-sdk-linux/tools:/home/connelblaze/android/android-sdk-linux/platform-tools:/bin:/home/connelblaze/go/bin:/usr/local/go/bin://home/connelblaze/go/src
2035 verbose lifecycle [email protected]~postinstall: CWD: /home/connelblaze/go/src/bitbucket.org/gomarket/go_jessy/node_modules/node-sass
2036 silly lifecycle [email protected]~postinstall: Args: [ '-c', 'node scripts/build.js' ]
2037 silly lifecycle [email protected]~postinstall: Returned: code: 1 signal: null
2038 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
2039 timing action:postinstall Completed in 482ms
It looks like you previously had [email protected] installed.
22 silly resolveWithNewModule [email protected] checking installable status
23 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
Maybe try clearing your cache.
rm -rf node_modules
npm cache clean
Had kind of similar issue while setting up a new project on my computer.
The fact was that I previously used the dos command set PATH=%PATH%;%~dp0\node_modules\.bin in order to be able to run gulp, which caused Windows to run node from the "node_modules.bin directory" instead of real installation of node path.
While installing I had the error message like "node is not recognized as an internal or external command".
Running the "npm install node-sass" command from a brand new batch window in the good folder solved the issue.
Hope this helps !
Okay... so I'm not sure if my problem is the same as this, but it sure looks similar. I'm using Ubuntu 16.04 and I was about to install "Harp.js" when I ecountered the error.
npm WARN optional Skipping failed optional dependency /harp/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 4.15.0-43-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "harp"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
I used the command sudo npm install -g harp and I found removing the sudo worked for me.
https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#running-with-sudo-or-as-root