问答

vue cli4脚手架创建失败

作者:admin 2021-08-20 我要评论

感觉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:\Users\A...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

感觉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:\Users\Administrator\Desktop\vue-admin\node_modules\which\which.js:68:19)n' +
gyp verb which failed ' at E (C:\Users\Administrator\Desktop\vue-admin\node_modules\which\which.js:80:29)n' +
gyp verb which failed ' at C:\Users\Administrator\Desktop\vue-admin\node_modules\which\which.js:89:16n' +
gyp verb which failed ' at C:\Users\Administrator\Desktop\vue-admin\node_modules\isexe\index.js:42:5n' +
gyp verb which failed ' at C:\Users\Administrator\Desktop\vue-admin\node_modules\isexe\windows.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\node\node.exe" "C:\Users\Administrator\Desktop\vue-admin\node_modules\node-gyp\bin\node-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

###
//看报错
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:\Python\27\python.exe"
###
  1. 非商业软件大多不保证环境支持,养成习惯,认真读日志,可以解决大部分问题
  2. Windows 10,非特殊要求,建议在 WSL 环境下配置
  3. python 和 ruby 是 Windows 开发环境的常见问题,先配置好,最好装在 C 盘根目录,目录名不要有空格

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • 使用箭头函数return数据不能实现

    使用箭头函数return数据不能实现

  • 个人小程序号能接入小程序3D地图吗?

    个人小程序号能接入小程序3D地图吗?

  • vue 移动端项目中,使用了better-scrol

    vue 移动端项目中,使用了better-scrol

  • css如何做出区域平均划分为四列

    css如何做出区域平均划分为四列

腾讯云代理商
海外云服务器