安装sass依赖包报错

来源:2-2 开发准备工作(生成字体图标)

qq_流程功能试数_stQUZ1

2018-12-24 14:26

- [0/2] Installing is-buffer@^1.1.5platform unsupported sass-loader@7.1.0 › webpack@3.12.0 › watchpack@1.6.0 › chokidar@2.0.4 › fsevents@^1.2.2 Package require os(darwin) not compatible with your platform(win32)

[fsevents@^1.2.2] optional install error: Package require os(darwin) not compatible with your platform(win32)

√ Installed 2 packages

Cached binary found at C:\Users\Administrator\.npminstall_tarball\node-sass\4.11.0\win32-x64-64_binding.node

Binary found at E:\web\web\node_modules\_node-sass@4.11.0@node-sass\vendor\win32-x64-64\binding.node

Testing binary

Binary has a problem: Error: \\?\E:\web\web\node_modules\_node-sass@4.11.0@node-sass\vendor\win32-x64-64\binding.node is not a valid Win32 application.

\\?\E:\web\web\node_modules\_node-sass@4.11.0@node-sass\vendor\win32-x64-64\binding.node

    at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18)

    at Module.load (internal/modules/cjs/loader.js:598:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)

    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

    at Module.require (internal/modules/cjs/loader.js:636:17)

    at require (internal/modules/cjs/helpers.js:20:18)

    at module.exports (E:\web\web\node_modules\_node-sass@4.11.0@node-sass\lib\binding.js:19:10)

    at Object.<anonymous> (E:\web\web\node_modules\_node-sass@4.11.0@node-sass\lib\index.js:14:35)

    at Module._compile (internal/modules/cjs/loader.js:688:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)

Building the binary locally

Building: C:\Program Files\nodejs\node.exe E:\web\web\node_modules\_node-gyp@3.8.0@node-gyp\bin\node-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:\\web\\web\\node_modules\\_node-gyp@3.8.0@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 node-gyp@3.8.0

gyp info using node@10.14.1 | win32 | x64

gyp verb command rebuild []

gyp verb command clean []

gyp verb clean removing "build" directory

gyp verb command configure []

gyp verb download using dist-url https://npm.taobao.org/mirrors/node

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:\web\web\node_modules\_which@1.3.1@which\which.js:13:12)

gyp verb `which` failed     at F (E:\web\web\node_modules\_which@1.3.1@which\which.js:68:19)

gyp verb `which` failed     at E (E:\web\web\node_modules\_which@1.3.1@which\which.js:80:29)

gyp verb `which` failed     at E:\web\web\node_modules\_which@1.3.1@which\which.js:89:16

gyp verb `which` failed     at E:\web\web\node_modules\_isexe@2.0.0@isexe\index.js:42:5

gyp verb `which` failed     at E:\web\web\node_modules\_isexe@2.0.0@isexe\windows.js:36:5

gyp verb `which` failed     at FSReqWrap.oncomplete

(fs.js:154:21)

gyp verb `which` failed  python2 { Error: not found: python2

gyp verb `which` failed     at getNotFoundError (E:\web\web\node_modules\_which@1.3.1@which\which.js:13:12)

gyp verb `which` failed     at F (E:\web\web\node_modules\_which@1.3.1@which\which.js:68:19)

gyp verb `which` failed     at E (E:\web\web\node_modules\_which@1.3.1@which\which.js:80:29)

gyp verb `which` failed     at E:\web\web\node_modules\_which@1.3.1@which\which.js:89:16

gyp verb `which` failed     at E:\web\web\node_modules\_isexe@2.0.0@isexe\index.js:42:5

gyp verb `which` failed     at E:\web\web\node_modules\_isexe@2.0.0@isexe\windows.js:36:5

gyp verb `which` failed     at FSReqWrap.oncomplete

(fs.js:154:21)

gyp verb `which` failed   stack:

gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (E:\\web\\web\\node_modules\\_which@1.3.1@which\\which.js:13:12)\n    at F (E:\\web\\web\\node_modules\\_which@1.3.1@which\\which.js:68:19)\n    at E (E:\\web\\web\\node_modules\\_which@1.3.1@which\\which.js:80:29)\n    at E:\\web\\web\\node_modules\\_which@1.3.1@which\\which.js:89:16\n    at E:\\web\\web\\node_modules\\_isexe@2.0.0@isexe\\index.js:42:5\n    at E:\\web\\web\\node_modules\\_isexe@2.0.0@isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:154: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:\Users\Administrator\AppData\Local\Programs\Python\Python36\python.EXE

gyp ERR! configure error

gyp ERR! stack Error: Command failed: C:\Users\Administrator\AppData\Local\Programs\Python\Python36\python.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:289:12)

gyp ERR! stack     at ChildProcess.emit (events.js:182:13)

gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

gyp ERR! System Windows_NT 10.0.17134

gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\web\\web\\node_modules\\_node-gyp@3.8.0@node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags="

"--libsass_library="

gyp ERR! cwd E:\web\web\node_modules\_node-sass@4.11.0@node-sass

gyp ERR! node -v v10.14.1

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

Build failed with error code: 1

× Install fail! Error: post install error, please r

emove node_modules before retry!

Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1

Error: post install error, please remove node_modules before retry!

Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1

    at ChildProcess.proc.on.code (C:\Program Files\nodejs\node_global\node_modules\cnpm\node_modules\runscript\index.js:74:21)    at ChildProcess.emit (events.js:182:13)

    at maybeClose (internal/child_process.js:962:16)    at Process.ChildProcess._handleess.ChildProcess._handle.onexit (internal/child_process.js:251:5)npminstall version: 3.16.0                                     les\nodejs\node_global\nnpminstall args: C:\Program Files\nodejs\node.exe C:\Program Fiug-versions --china --us    at maybeClose (internal/child_process.js:962:16)    at Procaobao.org/mirrors/node -ess.ChildProcess._hand                                          --save-devle.onexit (internal/child_process.js:251:5)odejs\node_global\node_modules\cnpm\node_modules\runscript\index.js:74:21                                                 Fi

)    at ChildProcess.emit (events.js:182:13)                  ix

    at maybeClose (internal/child_process.js:962:16)    at Pr

ocess.ChildP                                                 /n

odejs\node_global\node_modules\cnpm\node_modules\runscript\in

dex.js                                                       s-

:74:21)

    at ChildProcess.emit (events.js:182:13)

    at maybeClose (internal/child_process.js:962:16)    at Pr

ocess.

ChildProcess._handle.onexit (internal/child_process.js:251:5)odejs\node_global\node_modules\cnpm\node_modules\runscript\in

dex.js:74:21)

    at ChildProcess.emit (events.js:182:13)

    at maybeClose (internal/child_process.js:962:16)    at Pr

oc

ess.ChildProcess._handle.onexit (internal/child_process.js:25

1:odejs\node_global\node_modules\cnpm\node_modules\runscript\inipt\index.js:74:21)

    at ChildProcess.emit (events.js:182:13)             at Pr    at maybeClose (internal/child_process.js:962:16)   ess.j: a

t Process.ChildProcess._handle.onexit (internal/child_pro                                                     ogramodejs\node_global\node_modules\cnpm\node_modules\runscrs\npmnipminstall version: 3.16.0                             rconf=pt\index.js:74:21)                                     .taobo    at ChildProcess.emit (events.js:182:13)            bao.oo    at maybeClose (internal/child_process.js:962:16)

at Process.ChildProcess._handle.onexit (internal/child_

ps\npminstall\bin\install.js --fix-bug-versions --chinaodejs\node_global\node_modules\cnpm\node_modules\runscript\tndex.js:74:21)\index.js:74:21)

    at ChildProcess.emit (events.js:182:13)              t    at maybeClose (internal/child_process.js:962:16)    asstjs:251:5)

 Process.ChildProcess._handle.onexit (internal/child_proc

epminstall args: C:\Program Files\nodejs\node.exe C:\Prograodejs\node_global\node_modules\cnpm\node_modules\runscri \nppminstall version: 3.16.0                               rct\index.js:74:21)                                       gm.    at ChildProcess.emit (events.js:182:13)             tao    at maybeClose (internal/child_process.js:962:16)    eaS E:\web\web>

t Process.ChildProcess._handle.onexit (internal/child_pruo

odejs\node_global\node_modules\cnpm\node_modules\runscri/pt\index.js:74:21)

    at ChildProcess.emit (events.js:182:13)             n    at maybeClose (internal/child_process.js:962:16)

at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

npminstall version: 3.16.0npminstall args: C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_global\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\Administrator\.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org node-sass sass-loader --save-dev


写回答 关注

1回答

  • Zz皓
    2018-12-26 09:29:09

    可能是权限不足,使用管理员权限试试

快速入门Web阅读器开发

带你了解电子书阅读器的工作原理,通过Vue.js快速实现Web阅读器

26251 学习 · 214 问题

查看课程

相似问题