npm install throwing error in node-sass

npm install node-sass
node-sass error
npm rebuild node-sass
error: cannot find module 'node-sass'
npm install node-sass error windows
failed at the node-sass@4.12.0 postinstall script.
node-sass node 12
yarn add node-sass
node-sass@2.1.1 install /home/user/Documents/project/node_modules/node-sass
> node scripts/install.js

WARN invalid config loglevel="notice"
Can not download file from https://raw.githubusercontent.com/sass/node-sass-binaries/v2.1.1/linux-x64-node-8.2/binding.node

> node-sass@2.1.1 postinstall /home/user/Documents/project/node_modules/node-sass
> node scripts/build.js

module.js:487
    throw err;
    ^

Error: Cannot find module '/home/user/Documents/project/node_modules/node-sass/node_modules/pangyp/bin/node-gyp'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Build failed
added 2186 packages in 42.166s

I tried so far:

  • npm rebuild
  • npm rebuild node-sass
  • npm uninstall -g node-sass
  • rm -rf node_module
  • The minimum version with Node 8 support is 4.5.3. Offhand, I don't think 2.x will support anything above Node 0.12, which is EOL.

    Fail to install node-sass during npm install · Issue #2415 · sass/node , module.js:471 throw err; ^. Error: Cannot find module 'node-sass' at Function.​Module._resolveFilename (module.js:469:15) at Function.Module. I was trying to install node-sass on Linux Mint by running the command sudo npm install node-sass, but I got some errors.It says that it does not have access to some directories, which doesn't make any sense because I ran it with sudo.

    You need to do next steps and it should work:

    rm -rf node_modules package-lock.json 
    npm install --saveDev node-sass@4.5.3 
    npm install
    

    Voila :)

    Can not install node-sass, I have an error when i run npm install node-sass, i have already the last versions of node and npm (LTS) and previously already installed npm  use nvm to install node version & try 'npm install' with different node version – Amit kumar Oct 11 '18 at 13:38 I had that problem before I solved it by installing the latest version of node and npm.

    I have found I get node-sass errors when trying to install over a corporate proxy. The first solution is to ensure your .npmrc file has proxy allowance.

    .npmrc
    # Try removing reference to registry, as sometimes your local corporate registry of node_modules may not include node-sass
    # // registry=https://....
    
    # note if using special characters in pass, encode them: eg: h@ppy = h%40ppy
    strict-ssl=false
    proxy=http://<username>:<pass>@proxyhost:<port>
    https-proxy=http://<uname>:<pass>@proxyhost:<port>
    
    NODE_TLS_REJECT_UNAUTHORIZED = 0

    Then in command line before running any install

    set NODE_TLS_REJECT_UNAUTHORIZED = 0
    
    Zip node-binding files from node-sass github site in order to download them over corporate network.

    Example: https://github.com/inspiraller/node-sass-bindings

    node-sass, Install. npm install node-sass. Some users have reported issues importers can return error and LibSass will emit that error in response. > node-sass@4.12.0 postinstall C:\Users\Cliente\source\repos\Integracao\Organiza.Portal.Web ode_modules ode-sass > node scripts/build.js Building: C:\Program Files odejs ode.exe C:\Users\Cliente\source\repos\Integracao\Organiza.Portal.Web ode_modules ode-gyp\bin ode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass

    node-sass error – JH Tech Services, The npm rebuild node-sass command does nothing because the binary is actually correct. file (I think this is key), and then running npm install. This fixed /node_modules/node-sass/lib/binding.js:15 throw new Error(errors. npm install node-gyp That’s it! After the installation is complete, close and re-run (normally) the terminal window and proceed by installing the problematic package again, which should run successfully.

    node-sass error when installing on Ubuntu 18.04, root@west:/usr/lib/node_modules# npm install -g node-sass npm WARN scripts/install.js internal/modules/cjs/loader.js:979 throw err; ^ Error:  CentOS 6.7, node-sass 3.3.3 (or old versions) I use this plugin in gulp-css-preprocessor which is used in my application. When I run npm install first time it works, but next time npm install can throw error: Error: Command failed: /bin/

    npm install error HTTP error 404 Not Found while using gulp-sass or , npm install error HTTP error 404 Not Found while using gulp-sass or a version that will just have a problem and will throw an exception at  We are installing gulp-sass, which installs node-sass. I noticed that version 3.9.0 was messed up, but it looks like 3.9.3 should have fixed these installation issues. However, we&#39;re still havi

    Comments
    • It seems you need to have node-gyp installed. npm install -g node-gyp
    • node-sass@2.1.1 is severely outdated (I tried installing it and was able to reproduce the error); you can try editing package.json to use the most recent version instead. (remove @2.1.1)
    • what is the significance of specific version 4.5.3? How to determine this version for my environment? My package.json is tryign to install ^4.11.0 node-sass