老师,请问怎么解决这个问题,python也配置好了
来源:2-5 开发准备

慕少1220926
2017-05-25
D:\code\auction>npm install --save admin-lte
npm WARN prefer global node-gyp@3.6.1 should be installed with -g
> node-sass@4.5.3 install D:\code\auction\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-51_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-51_binding.node":
connect ETIMEDOUT 54.231.112.176:443
Timed out whilst downloading the prebuilt binary
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@4.5.3 postinstall D:\code\auction\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe D:\code\auction\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 'D:\\code\\auction\\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.1
gyp info using node@7.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 (D:\code\auction\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\code\auction\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\code\auction\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\code\auction\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\code\auction\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\code\auction\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:114:15)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (D:\code\auction\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\code\auction\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\code\auction\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\code\auction\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\code\auction\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\code\auction\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:114:15) 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 (D:\code\auction\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\code\auction\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\code\auction\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\code\auction\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\code\auction\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\code\auction\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:114:15)
gyp verb `which` failed python { Error: not found: python
gyp verb `which` failed at getNotFoundError (D:\code\auction\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\code\auction\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\code\auction\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\code\auction\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\code\auction\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\code\auction\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:114:15) 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 (D:\code\auction\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (D:\code\auction\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at D:\code\auction\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\code\\auction\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsas
s_ldflags=" "--libsass_library="
gyp ERR! cwd D:\code\auction\node_modules\node-sass
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
Build failed with error code: 1
auction@0.0.0 D:\code\auction
`-- admin-lte@2.3.11
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 (node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
D:\code\auction>npm run start
> auction@0.0.0 start D:\code\auction
> ng serve
** NG Live Development Server is running on http://localhost:4200 **
Hash: 1e051632faaca8082d72
Time: 14740ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 158 kB {5} [initial] [rendered]
chunk {1} styles.bundle.js, styles.bundle.js.map (styles) 270 kB {5} [initial] [rendered]
chunk {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 138 kB {5} [initial] [rendered]
chunk {3} main.bundle.js, main.bundle.js.map (main) 17.3 kB {4} [initial] [rendered]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.46 MB [initial] [rendered]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
ERROR in multi ./src/styles.css ./~/bootstrap/dist/css/bootstrap.min.css ./~/admin-lte/dist/css/AdminLTE.min.css ./~/admin-lte/dist/skins/skin-blue.min.css
Module not found: Error: Can't resolve 'D:\code\auction\node_modules\admin-lte\dist\skins\skin-blue.min.css' in 'D:\code\auction'
@ multi ./src/styles.css ./~/bootstrap/dist/css/bootstrap.min.css ./~/admin-lte/dist/css/AdminLTE.min.css ./~/admin-lte/dist/skins/skin-blue.min.css
webpack: Failed to compile.
1回答
-
JoJo
2017-05-26
看错误还是是python环境没配置好啊...gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. 这是找不到可执行的python命令啊,你在命令行直接敲python有反应么?
012017-05-30
相似问题