npm install ->Failed at the node-sass@4.5.0 postinstall script

后端 未结 17 1798
梦谈多话
梦谈多话 2021-01-30 08:02

I\'m trying to do npm install and an error appears :

Failed at the node-sass@4.5.0 postinstall script.

I tried to delete no

相关标签:
17条回答
  • 2021-01-30 08:49

    After uninstalling node-sass try cleaning your npm cache. After that try installing node-sass again.

    npm cache clean && npm install node-sass
    
    0 讨论(0)
  • 2021-01-30 08:51

    rolling back to node v10.17.0 fixed the problem to me.

    You can use nvm to do so:

    https://github.com/nvm-sh/nvm

    > nvm install 10.17.0
    > nvm use 10.17.0
    > node -v
    10.17.0
    
    0 讨论(0)
  • 2021-01-30 08:52

    I needed to take the following steps to "resolve" this problem:

    1. Create folder at the root: mkdir ~/safe_node_module;
    2. Download package wget -q https://github.com/sass/node-sass/releases/download/v4.13.0/linux-x64-72_binding.node and then send to the folder created in step 1;
    3. Set the export environment variable export SASS_BINARY_PATH=/home/ronaldaraujo/safe_node_module/linux-x64-72_binding.node;
    4. Install packages normally npm i;
    0 讨论(0)
  • 2021-01-30 08:52

    Sometime unable to download file win32-x64-79_binding.node due to your proxy restrict to download so plase follow this below link set them manually. https://github.com/sass/node-sass/issues/2773

    0 讨论(0)
  • 2021-01-30 08:53

    I also had to face the same problem with node v12.16.3.

    1. Remove node-sass dependency from your package.json if it is mentioned in your dependencies.This will allow npm to install other required dependencies without any disruption.

    2. Delete package-lock.json file and node_modules folder from your project.

    3. Force clean the entire NPM cache by using following comand.

      npm cache clean --force
      
    4. Re-Install all the dependencies.

      npm install
      
    5. Now you can install node-sass.

      npm i node-sass
      
    0 讨论(0)
提交回复
热议问题