我在节点服务器中运行wittr时遇到问题。它显示错误 - 找不到模块'gulp-sass'。当我打开http://127.0.0.1:8080/1时,我用cdm安装的服务器只显示来自课程的克隆repo的目录。谢谢你解决它。 回复:https://github.com/jakearchibald/wittr
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Freeware Sys\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'serve' ]
2 info using npm@5.5.1
3 info using node@v8.9.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle wittr@1.0.0~preserve: wittr@1.0.0
6 info lifecycle wittr@1.0.0~serve: wittr@1.0.0
7 verbose lifecycle wittr@1.0.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle wittr@1.0.0~serve: PATH: C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\.bin;C:\Users\Freeware Sys\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Freeware Sys\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\Freeware Sys\AppData\Local\Microsoft\WindowsApps;C:\Users\Freeware Sys\AppData\Local\atom\bin;C:\Users\Freeware Sys\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle wittr@1.0.0~serve: CWD: C:\Users\Freeware Sys\Desktop\Coding Staff\wittr
10 silly lifecycle wittr@1.0.0~serve: Args: [ '/d /s /c', 'gulp serve' ]
11 silly lifecycle wittr@1.0.0~serve: Returned: code: 1 signal: null
12 info lifecycle wittr@1.0.0~serve: Failed to exec serve script
13 verbose stack Error: wittr@1.0.0 serve: `gulp serve`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid wittr@1.0.0
15 verbose cwd C:\Users\Freeware Sys\Desktop\Coding Staff\wittr
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Freeware Sys\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
18 verbose node v8.9.0
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error wittr@1.0.0 serve: `gulp serve`
22 error Exit status 1
23 error Failed at the wittr@1.0.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
在npm之后我:
$ npm i
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
> bufferutil@1.2.1 install C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\bufferutil
> node-gyp rebuild
C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Freeware Sys\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\bufferutil
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
> utf-8-validate@1.2.2 install C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\utf-8-validate
> node-gyp rebuild
C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Freeware Sys\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Freeware Sys\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\utf-8-validate
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
> node-sass@3.13.1 install C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_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
> node-sass@3.13.1 postinstall C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\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 'C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\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 node-gyp@3.6.2
gyp info using node@8.9.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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: python2\n at getNotFoundError (C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:13:12)\n at F (C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:68:19)\n at E (C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:80:29)\n at C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:89:16\n at C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\isexe\\index.js:42:5\n at C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed at getNotFoundError (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python { Error: not found: python
gyp verb `which` failed at getNotFoundError (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: python\n at getNotFoundError (C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:13:12)\n at F (C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:68:19)\n at E (C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:80:29)\n at C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\which\\which.js:89:16\n at C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\isexe\\index.js:42:5\n at C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\node-sass
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN Error: EPERM: operation not permitted, lstat 'C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\cryptiles\node_modules'
npm WARN { Error: EPERM: operation not permitted, lstat 'C:\Users\Freeware Sys\Desktop\Coding Staff\wittr\node_modules\cryptiles\node_modules'
npm WARN stack: 'Error: EPERM: operation not permitted, lstat \'C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\cryptiles\\node_modules\'',
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'lstat',
npm WARN path: 'C:\\Users\\Freeware Sys\\Desktop\\Coding Staff\\wittr\\node_modules\\cryptiles\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 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:\Users\Freeware Sys\AppData\Roaming\npm-cache\_logs\2017-11-07T11_48_46_250Z-debug.log
答案 0 :(得分:1)
尝试此命令
npm install --global --production windows-build-tools
并使用
npm i