Node sass gyp error

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 install -g windows-build-tools Please, i need your help...

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 install -g windows-build-tools

Please, i need your help i can not figure out what is the issue?, and how to solved.

This is my platform:

  • NPM version (npm -v): 3.10.10
  • Node version (node -v): 6.10.3
  • Node Process (node -p process.versions):
{ http_parser: '2.7.0',
  node: '6.10.3',
  v8: '5.1.281.101',
  uv: '1.9.1',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  icu: '58.2',
  modules: '48',
  openssl: '1.0.2k' }
  • Node Platform (node -p process.platform): win32
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
  • npm node-sass versions (npm ls node-sass):

Error message from npm install node-sass

> node-sass@4.5.3 postinstall C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sass
> node scripts/build.js
 
Building: C:Program Filesnodejsnode.exe C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnode_modulesnode
-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\Program Files\nodejs\node.exe',
gyp verb cli   'C:\Users\carlosm\AppData\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\bin\node-gy
p.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.6.1
gyp info using node@6.10.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:Python27python.exe" in the PATH
gyp verb `which` succeeded C:Python27python.exe C:Python27python.exe
gyp verb check python version `C:Python27python.exe -c "import platform; print(platform.python_version());"` returned:
"2.7.13rn"
gyp verb get node dir no --target version specified, falling back to host node version: 6.10.3
gyp verb command install [ '6.10.3' ]
gyp verb install input version string "6.10.3"
gyp verb install installing version: 6.10.3
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 0
gyp verb needs "installVersion" 9
gyp verb install version is no good; reinstalling
gyp verb ensuring nodedir is created C:Userscarlosm.node-gyp6.10.3
gyp http GET https://nodejs.org/download/release/v6.10.3/node-v6.10.3-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '6.10.3' ]
gyp verb remove using node-gyp dir: C:Userscarlosm.node-gyp
gyp verb remove removing target version: 6.10.3
gyp verb remove removing development files for version: 6.10.3
gyp ERR! configure error
gyp ERR! stack Error: ENOENT: no such file or directory, open 'D:DevWEBtest-sass-appundefined'
gyp ERR! stack     at Error (native)
gyp ERR! stack     at Object.fs.openSync (fs.js:641:18)
gyp ERR! stack     at Object.fs.readFileSync (fs.js:509:33)
gyp ERR! stack     at readCAFile (C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnode_modulesnode-gyplib
install.js:466:15)
gyp ERR! stack     at download (C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnode_modulesnode-gyplibin
stall.js:438:22)
gyp ERR! stack     at C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnode_modulesnode-gyplibinstall.js:1
85:19
gyp ERR! stack     at C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnode_modulesmkdirpindex.js:48:26
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\carlosm\AppData\Roaming\npm\node_modules\node-sa
ss\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldfl
ags=" "--libsass_library="
gyp ERR! cwd C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sass
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Build failed with error code: 1
npm verb lifecycle node-sass@4.5.3~postinstall: unsafe-perm in lifecycle true
npm verb lifecycle node-sass@4.5.3~postinstall: PATH: C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin;C:Users
carlosmAppDataRoamingnpmnode_modulesnode-sassnode_modules.bin;C:UserscarlosmAppDataRoamingnpmnode_modules
.bin;%SystemRoot%system32WindowsPowerShellv1.0;C:Python27;C:Python27Scripts;C:appsoracleproduct11.2.0client
_1bin;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32W
indowsPowerShellv1.0;C:Program FilesTortoiseSVNbin;C:Program Filesnodejs;C:Program Files (x86)Windows Kits8.1
Windows Performance Toolkit;$PATH;D:JAVAapache-tomcat-8.0.9/bin;C:Program Files (x86)VSCode-win32-1.11.2;C:Pytho
n27;C:UserscarlosmAppDataRoamingnpm
npm verb lifecycle node-sass@4.5.3~postinstall: CWD: C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sass
npm info lifecycle node-sass@4.5.3~postinstall: Failed to exec postinstall script
npm verb unlock done using C:UserscarlosmAppDataRoamingnpm-cache_locksstaging-fce30b53446447ec.lock for C:Users
carlosmAppDataRoamingnpmnode_modules.staging
npm verb stack Error: node-sass@4.5.3 postinstall: `node scripts/build.js`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmlibutilslifecycle.js:255:16)
npm verb stack     at emitTwo (events.js:106:13)
npm verb stack     at EventEmitter.emit (events.js:191:7)
npm verb stack     at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmlibutilsspawn.js:40:14)
npm verb stack     at emitTwo (events.js:106:13)
npm verb stack     at ChildProcess.emit (events.js:191:7)
npm verb stack     at maybeClose (internal/child_process.js:886:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm verb pkgid node-sass@4.5.3
npm verb cwd D:DevWEBMetricsMonitorClientdashboard-sass
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "ins
tall" "-g" "node-sass" "--verbose"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
 
npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.3 postinstall script 'node scripts/build.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/build.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.
npm verb exit [ 1, true ]
 
npm ERR! Please include the following file with any support request:
npm ERR!     D:DevWEBMetricsMonitorClientdashboard-sassnpm-debug.log

I follow the template, please do not close the issue, i have already three day without solution to this issue

Содержание

  1. Fails to install with node-gyp error #1749
  2. Comments
  3. Can not install node-sass — ERR! Failed at the node-sass@4.5.3 postinstall script ‘node scripts/build.js’. #1980
  4. Comments
  5. Error message from npm install node-sass
  6. gyp ERR! configure error #2069
  7. Comments
  8. Failed at the node-sass@4.7.2 postinstall script. #2397
  9. Comments
  10. Node-gyp g++ and libsass error #1998
  11. Comments

Fails to install with node-gyp error #1749

I am trying to install node-sass and am running into this error from node-gyp. I tried to attach the log file but it failed.
Node: 6.8.0 (tried with 6.2.2 as well)
npm: 3.10.8
node-gyp: 3.4.0

gyp info spawn args ‘—depth=.’,
gyp info spawn args ‘—no-parallel’,
gyp info spawn args ‘—generator-output’,
gyp info spawn args ‘C:devfirebase-starter-packnode_modulesnode-sassbuild’,
gyp info spawn args ‘-Goutput_dir=.’ ]
C:devfirebase-starter-packnode_modulesnode-gypgyppylibgypinput.py:888: Warning: ‘as’ will become a reserved keyw
ord in Python 2.6
Traceback (most recent call last):
File «C:devfirebase-starter-packnode_modulesnode-gypgypgyp_main.py», line 13, in
import gyp
File «C:devfirebase-starter-packnode_modulesnode-gypgyppylibgyp__init__.py», line 8, in
import gyp.input
File «C:devfirebase-starter-packnode_modulesnode-gypgyppylibgypinput.py», line 888
except ImportError as e:
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:devfirebase-starter-packnode_modulesnode-gyplibconfigure.js:305:16)

gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command «C:Program Filesnodejsnode.exe» «C:devfirebase-starter-packnode_modulesnode-gypbinnod
e-gyp.js» «rebuild» «—verbose» «—libsass_ext=» «—libsass_cflags=» «—libsass_ldflags=» «—libsass_library=»
gyp ERR! cwd C:devfirebase-starter-packnode_modulesnode-sass
gyp ERR! node -v v6.8.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Build failed
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleschokidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted <«os»:»darwin»,»arch»:»an
y»> (current: <«os»:»win32″,»arch»:»x64″>)
npm WARN firebase-starter-pack@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 (node_modulesbufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.1 (node_modulesutf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

The text was updated successfully, but these errors were encountered:

Источник

Can not install node-sass — ERR! Failed at the node-sass@4.5.3 postinstall script ‘node scripts/build.js’. #1980

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 install -g windows-build-tools

Please, i need your help i can not figure out what is the issue?, and how to solved.

This is my platform:

  • NPM version ( npm -v ): 3.10.10
  • Node version ( node -v ): 6.10.3
  • Node Process ( node -p process.versions ):
  • Node Platform ( node -p process.platform ): win32
  • Node architecture ( node -p process.arch ): x64
  • node-sass version ( node -p «require(‘node-sass’).info» ):
  • npm node-sass versions ( npm ls node-sass ):

Error message from npm install node-sass

postinstall: unsafe-perm in lifecycle true npm verb lifecycle node-sass@4.5.3

postinstall: PATH: C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin;C:Users carlosmAppDataRoamingnpmnode_modulesnode-sassnode_modules.bin;C:UserscarlosmAppDataRoamingnpmnode_modules .bin;%SystemRoot%system32WindowsPowerShellv1.0;C:Python27;C:Python27Scripts;C:appsoracleproduct11.2.0client _1bin;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32W indowsPowerShellv1.0;C:Program FilesTortoiseSVNbin;C:Program Filesnodejs;C:Program Files (x86)Windows Kits8.1 Windows Performance Toolkit;$PATH;D:JAVAapache-tomcat-8.0.9/bin;C:Program Files (x86)VSCode-win32-1.11.2;C:Pytho n27;C:UserscarlosmAppDataRoamingnpm npm verb lifecycle node-sass@4.5.3

postinstall: CWD: C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sass npm info lifecycle node-sass@4.5.3

I follow the template, please do not close the issue, i have already three day without solution to this issue

The text was updated successfully, but these errors were encountered:

postinstall: unsafe-perm in lifecycle truenpm verb lifecycle ***@***.***

postinstall: PATH: C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin;C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnode_modules.bin;C:UserscarlosmAppDataRoamingnpmnode_modules.bin;%SystemRoot%system32WindowsPowerShellv1.0;C:Python27;C:Python27Scripts;C:appsoracleproduct11.2.0client_1bin;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesTortoiseSVNbin;C:Program Filesnodejs;C:Program Files (x86)Windows Kits8.1Windows Performance Toolkit;$PATH;D:JAVAapache-tomcat-8.0.9/bin;C:Program Files (x86)VSCode-win32-1.11.2;C:Python27;C:UserscarlosmAppDataRoamingnpmnpm verb lifecycle ***@***.***

postinstall: CWD: C:UserscarlosmAppDataRoamingnpmnode_modulesnode-sassnpm info lifecycle ***@***.***

Источник

gyp ERR! configure error #2069

node-sass@4.9.3 install C:varwwwproject-dirnode_modulesnode-sass
node scripts/install.js

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

or configure npm proxy via

node-sass@4.9.3 postinstall C:varwwwproject-dirnode_modulesnode-sass
node scripts/build.js

Building: C:Program Filesnodejsnode.exe C:varwwwproject-dirnode_modulesnode-gypbinnode-gyp.js rebuild —verbose —libsass_ext= —libsass_cflags= —libsass_ldflags= —libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli ‘C:Program Filesnodejsnode.exe’,
gyp verb cli ‘C:varwwwproject-dirnode_modulesnode-gypbinnode-gyp.js’,
gyp verb cli ‘rebuild’,
gyp verb cli ‘—verbose’,
gyp verb cli ‘—libsass_ext=’,
gyp verb cli ‘—libsass_cflags=’,
gyp verb cli ‘—libsass_ldflags=’,
gyp verb cli ‘—libsass_library=’
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.6.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing «build» directory
gyp verb command configure []
gyp verb check python checking for Python executable «C:Python37python.exe» in the PATH
gyp verb which succeeded C:Python37python.exe C:Python37python.exe
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:Python37python.exe -c import sys; print «%s.%s.%s» % sys.version_info[:3];
gyp ERR! stack File «», line 1
gyp ERR! stack import sys; print «%s.%s.%s» % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:297:12)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command «C:Program Filesnodejsnode.exe» «C:varwwwproject-dirnode_modulesnode-gypbinnode-gyp.js» «rebuild» «—verbose» «—libsass_ext=» «—libsass_cflags=» «—libsass_ldflags=» «—libsass_library=»
gyp ERR! cwd C:varwwwproject-dirnode_modulesnode-sass
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted <«os»:»darwin»,»arch»:»any»>(current: <«os»:»win32″,»arch»:»x64″>)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.3 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.3 postinstall 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! C:UsersUserNameAppDataRoamingnpm-cache_logs2020-03-12T13_15_02_615Z-debug.log

The text was updated successfully, but these errors were encountered:

Источник

Failed at the node-sass@4.7.2 postinstall script. #2397

  • NPM version ( npm -v ): 6.0.1
  • Node version ( node -v ): v8.11.2
  • Node Process ( node -p process.versions ):
  • Node Platform ( node -p process.platform ): undefined
  • Node architecture ( node -p process.arch ): x64
  • node-sass version ( node -p «require(‘node-sass’).info» ): Error: Cannot find module ‘node-sass’
  • npm node-sass versions ( npm ls node-sass ): npm ERR! missing: node-sass@4.7.2, required by projectx@0.0.1

I’m having some problems. Let me try to take you down the steps I took to get me in this situation.
Yesterday, everything was working great! Then I did something.. I don’t exactly know what I did, but I updated some file from 4.4.0 to 4.7.0 .. I think it was either Ionic, Cordova, or NPM related.

After updating I got an error saying that Angular CLI is not compatible with my version of Node. For some reason I decided to follow this tutorial to fix: angular/angular-cli#10527 saying:

  1. Download and save a local copy of the correct version of node-sass binary — win32-x64-64_binding.node. For example download it to the following location:
    C:node-sasswin32-x64-64_binding.node
  2. Provide reference to the full path of the node-sass binary file in the sass_binary_path npm configuration parameter (in the

/.npmrc file):
npm config set sass_binary_path
For example,
npm config set sass_binary_path C:node-sasswin32-x64-64_binding.node

  • Run the npm install command again to install @angular/cli correctly.
  • Execute ng serve or npm start and your should be past the problem.
  • So I changed the node-sass path. I was still having some issues and realized that to fix I literally just had to download the latest version of NodeJS, which I ended up doing.

    I then did npm install on a project I was working on, which then gave me a lovely error:

    Failed at the node-sass@4.7.2 postinstall script.

    I tried doing npm rebuild node-sass —force which did nothing, unfortunately.

    At this point it must’ve been hour 10 of trying to figure out what the heck was going on, so out a fit of frustration I decided to do a Windows 10 recovery for the previous day. But no, I still have problems.

    Here is the error report after doing npm install :

    What should I do? I’ve been struggling with this for hours! Any help, please?

    The text was updated successfully, but these errors were encountered:

    Источник

    Node-gyp g++ and libsass error #1998

    I’ve been following the guide to install Zurb foundation but running into a consistent issue.
    $ npm install foundation-cli —global
    is successful but
    :foundation fivedoor$ foundation new
    brings up:

    I was advised on the node-gyp issue forum that his was not a node-gyp bug but perhaps a libsass issue. I have seen similar errors in other github posts.

    To be honest, being pretty new to node, I’m sure it’s possible I may have been inept in implementing some of the various solutions suggested.

    I have tried quite a few things without any joy:

    • complete uninstall/ reinstall latest node & npm;
    • clean npm cache; install with nvm, brew;
    • updating git to latest version that supports snow leopard;
    • npm —optional install ;
    • installed macports and then updated GCC and G++;
    • deleting .node-gyp folder and reinstall;
    • uninstall and reinstall foundation-cli.

    Failing a silver bullet solution, could someone advise if upgrading to a later OS is likely to help or not? ( I know snow leopard is old but I’ve clung on to it for stability.) I did get some warnings from brew that » We (and Apple) do not provide support for OS 10.6″

    The frustrating thing is at this stage I’m not trying to do anything more ‘advanced’ than just install the packages I need to get started.

    • MACOS X Version 10.6.8
    • npm 3.8.6
    • node v4.4.2
    • Xcode 3.2.6
    • GCC 4.8.5
    • g++ 4.8.5
    • nvm 0.31.0
    • git version 1.8.4.2
    • curl 7.19.7

    The text was updated successfully, but these errors were encountered:

    Источник

    problem

    installing node-sass encountered the following error

    PS E:phoneEmallphone-emall> npm i node-sass
    
    > [email protected] install E:phoneEmallphone-emallnode_modulesnode-sass
    > node scripts/install.js
    
    Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node
    Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node":
    
    HTTP error 404 Not Found
    
    Hint: If github.com is not accessible in your location
          try setting a proxy via HTTP_PROXY, e.g.
    
          export HTTP_PROXY=http://example.com:1234
    
    or configure npm proxy via
    
          npm config set proxy http://example.com:8080
    
    > [email protected] postinstall E:phoneEmallphone-emallnode_modulesnode-sass
    > node scripts/build.js
    
    Building: C:Program Filesnodejsnode.exe E:phoneEmallphone-emallnode_modulesnode-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
    gyp info it worked if it ends with ok
    gyp verb cli [ 'C:\Program Files\nodejs\node.exe',
    gyp verb cli   'E:\phoneEmall\phone-emall\node_modules\node-gyp\bin\node-gyp.js',
    gyp verb cli   'rebuild',
    gyp verb cli   '--verbose',
    gyp verb cli   '--libsass_ext=',
    gyp verb cli   '--libsass_cflags=',
    gyp verb cli   '--libsass_ldflags=',
    gyp verb cli   '--libsass_library=' ]
    gyp info using [email protected]
    gyp info using [email protected] | win32 | x64
    gyp verb command rebuild []
    gyp verb command clean []
    gyp verb clean removing "build" directory
    gyp verb command configure []
    gyp verb check python checking for Python executable "python2" in the PATH
    gyp verb `which` failed Error: not found: python2
    gyp verb `which` failed     at getNotFoundError (E:phoneEmallphone-emallnode_moduleswhichwhich.js:13:12)
    gyp verb `which` failed     at F (E:phoneEmallphone-emallnode_moduleswhichwhich.js:68:19)
    gyp verb `which` failed     at E (E:phoneEmallphone-emallnode_moduleswhichwhich.js:80:29)
    gyp verb `which` failed     at E:phoneEmallphone-emallnode_moduleswhichwhich.js:89:16
    gyp verb `which` failed     at E:phoneEmallphone-emallnode_modulesisexeindex.js:42:5
    gyp verb `which` failed     at E:phoneEmallphone-emallnode_modulesisexewindows.js:36:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
    gyp verb `which` failed  python2 { Error: not found: python2
    gyp verb `which` failed     at getNotFoundError (E:phoneEmallphone-emallnode_moduleswhichwhich.js:13:12)
    gyp verb `which` failed     at F (E:phoneEmallphone-emallnode_moduleswhichwhich.js:68:19)
    gyp verb `which` failed     at E (E:phoneEmallphone-emallnode_moduleswhichwhich.js:80:29)
    gyp verb `which` failed     at E:phoneEmallphone-emallnode_moduleswhichwhich.js:89:16
    gyp verb `which` failed     at E:phoneEmallphone-emallnode_modulesisexeindex.js:42:5
    gyp verb `which` failed     at E:phoneEmallphone-emallnode_modulesisexewindows.js:36:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
    gyp verb `which` failed   stack:
    gyp verb `which` failed    'Error: not found: python2n    at getNotFoundError (E:\phoneEmall\phone-emall\node_modules\which\which.js:13:12)n    at F (E:\phoneEmall\phone-emall\node_modules\which\which.js:68:19)n    at E (E:\phoneEmall\phone-emall\node_modules\which\which.js:80:29)n    at E:\phoneEmall\phone-emall\node_modules\which\which.js:89:16n    at E:\phoneEmall\phone-emall\node_modules\isexe\index.js:42:5n    at E:\phoneEmall\phone-emall\node_modules\isexe\windows.js:36:5n    at FSReqWrap.oncomplete (fs.js:153:21)',
    gyp verb `which` failed   code: 'ENOENT' }
    gyp verb check python checking for Python executable "python" in the PATH
    gyp verb `which` succeeded python C:UsersAdministratorAppDataLocalProgramsPythonPython37python.EXE
    gyp ERR! configure error
    gyp ERR! stack Error: Command failed: C:UsersAdministratorAppDataLocalProgramsPythonPython37python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
    gyp ERR! stack   File "<string>", line 1
    gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
    gyp ERR! stack                                ^
    gyp ERR! stack SyntaxError: invalid syntax
    gyp ERR! stack
    gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
    gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
    gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
    gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:389:11)
    gyp ERR! stack     at Socket.emit (events.js:189:13)
    gyp ERR! stack     at Pipe._handle.close (net.js:597:12)
    gyp ERR! System Windows_NT 6.1.7601
    gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\phoneEmall\phone-emall\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    gyp ERR! cwd E:phoneEmallphone-emallnode_modulesnode-sass
    gyp ERR! node -v v10.15.3
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    Build failed with error code: 1
    npm WARN [email protected] requires a peer of [email protected]^1.12.6 || ^2.1.0-beta but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of [email protected]^1.0.0 || ^2.0.0 || ^3.0.0 but
    none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of [email protected]>=1.3.0 <3 but none is installed. You must install peer dependencies yourself.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] postinstall 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!     C:UsersAdministratorAppDataRoamingnpm-cache_logs2019-07-12T03_34_51_589Z-debug.log
    

    to find the answer

    looked at the error message, and saw that there was a 404 in the file download. Then I searched for the file and found the hosts file. I thought it was a python problem, and then I reinstalled various versions of python…

    took 3 hours, tried countless answers on the Internet, no solution

    improved the version number of sass-loader and node-sass to the latest version, the current latest version is as follows (July 12, 2019)
    “sass-loader” : “^7.1.0”,
    “node-sass” : “^4.12.0”,

    as shown in the figure, modify the package.json file

    then execute the following command to install

    npm i sass-loader
    npm i node-sass
    

    2020-05-06 update

    the problem is often the cause of the Node – sass version problem, may be one reason for this is that: because version too old so will cause some dependencies have already can’t find it, the company has a four years ago old projects is this kind of problem, the modified Node – sass version 4.12 is not necessarily suitable for all projects, can test several versions, if the above version failed can try this version

    "node-sass": "^4.13.1",
    "sass-loader": "^4.1.1",
    

    What if

    still fails?

    my answer may not be right for you, but you have to believe in the bright side.

    a keen discussion program + financial management person, welcome to exchange ~

    Понравилась статья? Поделить с друзьями:

    Читайте также:

  • Node must be provided when reporting error if location is not provided
  • Node js обработка ошибок
  • Node js логирование ошибок
  • Node js websocket error
  • Node js validation error

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии