问题描述

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli ‘E:\node.exe’,
1 verbose cli ‘E:\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘dev’
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.4
4 verbose run-script [ ‘predev’, ‘dev’, ‘postdev’ ]
5 info lifecycle vue-element-admin@4.4.0~predev: vue-element-admin@4.4.0
6 info lifecycle vue-element-admin@4.4.0~dev: vue-element-admin@4.4.0
7 verbose lifecycle vue-element-admin@4.4.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle vue-element-admin@4.4.0~dev: PATH: E:\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\毕业设计\vue-element-admin\node_modules.bin;C:\Python38\Scripts;C:\Python38;D:\oooooooo\product\11.2.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel® Management Engine Components\iCLS;C:\Program Files\Intel\Intel® Management Engine Components\iCLS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\MySQL\MySQL Server 5.5\bin;:\java web\apache-tomcat-9.0.29\bin;E:\java web\apache-tomcat-9.0.29\lib;C:\Program Files\Java\jdk1.8.0_131;C:\Program Files\Java\jre1.8.0_131;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\GitHub\Git\bin;E:\MavenCloud\apache-maven-3.6.3\bin;E:\Vagrant\bin;C:\ProgramData\chocolatey\bin;E:;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;E:\360驱动大师目录\Scripts;E:\360驱动大师目录;C:\Users\think\AppData\Local;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\jre\bin;;C:\Users\think\AppData\Local\Microsoft\WindowsApps;D:\ideaRUN\IntelliJ IDEA 2019.3.3\bin;;D:\Microsoft VS Code\bin;C:\Users\think\AppData\Roaming\npm
9 verbose lifecycle vue-element-admin@4.4.0~dev: CWD: E:\毕业设计\vue-element-admin
10 silly lifecycle vue-element-admin@4.4.0~dev: Args: [ ‘/d /s /c’, ‘vue-cli-service serve’ ]
11 silly lifecycle vue-element-admin@4.4.0~dev: Returned: code: 1 signal: null
12 info lifecycle vue-element-admin@4.4.0~dev: Failed to exec dev script
13 verbose stack Error: vue-element-admin@4.4.0 dev: vue-cli-service serve
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (E:\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (E:\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid vue-element-admin@4.4.0
15 verbose cwd E:\毕业设计\vue-element-admin
16 verbose Windows_NT 10.0.18363
17 verbose argv “E:\node.exe” “E:\node_modules\npm\bin\npm-cli.js” “run” “dev”
18 verbose node v12.18.4
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error vue-element-admin@4.4.0 dev: vue-cli-service serve
22 error Exit status 1
23 error Failed at the vue-element-admin@4.4.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

在这里插入图片描述

运行vue-element-admin的时候报如上错误
应该是:
npm install --registry=https://registry.npm.taobao.org执行的时候,出现错误

没有sass-loader和node-sass模块

解决方案

分别执行这两条命令:

1、npm install node-sass --save-dev
2、npm install sass-loader --save-dev

回到根目录
然后依次执行删除
node_modules package-lock.json文件夹
在这里插入图片描述
再依次执行以下代码
开启新的命令窗口

npm cache clear --force
npm install

在这里插入图片描述
在这里插入图片描述

npm run dev

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

其他可能的问题: 点击

Logo

前往低代码交流专区

更多推荐