Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

vue cli4脚手架创建失败

感觉vue真的好无语 最基本的下载都各种问题 环境如下
$ vue -V
@vue/cli 4.3.1
$ npm -v
6.13.4

which.js:13:12)n' +
gyp verb which failed ' at F (C:UsersAdministratorDesktopvue-admin ode_moduleswhichwhich.js:68:19)n' +
gyp verb which failed ' at E (C:UsersAdministratorDesktopvue-admin ode_moduleswhichwhich.js:80:29)n' +
gyp verb which failed ' at C:UsersAdministratorDesktopvue-admin ode_moduleswhichwhich.js:89:16n' +
gyp verb which failed ' at C:UsersAdministratorDesktopvue-admin ode_modulesisexeindex.js:42:5n' +
gyp verb which failed ' at C:UsersAdministratorDesktopvue-admin ode_modulesisexewindows.js:36:5n' +
gyp verb which failed ' at FSReqCallback.oncomplete (fs.js:166:21)',
gyp verb which failed code: 'ENOENT'
gyp verb which failed }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:Python27python.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:UsersAdministratorDesktopvue-adminnode_modulesnode-gyplibconfigure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:UsersAdministratorDesktopvue-adminnode_modulesnode-gyplibconfigure.js:509:16)
gyp ERR! stack at callback (C:UsersAdministratorDesktopvue-adminnode_modulesgraceful-fspolyfills.js:295:20)
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:166:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "D:EK ode ode.exe" "C:UsersAdministratorDesktopvue-admin ode_modules ode-gypin ode-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:UsersAdministratorDesktopvue-adminnode_modulesnode-sass
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.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:UsersAdministratorAppDataRoamingnpm-cache_logs2020-05-08T16_57_56_923Z-debug.log
ERROR command failed: npm install --loglevel error
PS C:UsersAdministratorDesktop> cd .vue-admin
PS C:UsersAdministratorDesktopvue-admin> npm run server
npm ERR! missing script: server


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
//看报错
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

you can try

npm install --global --production windows-build-tools
//or
npm --add-python-to-path='true' --debug install --global windows-build-tools
//or
npm config set python "c:Python27python.exe"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...