[英]Why does my webpack project fail to build when i clone from github repo?
So I had an old version of a project on one machine in regards to a project that is a github repo being worked on using a different machine. 所以我在一台机器上有一个旧版本的项目,这个项目是一个使用不同机器处理的github repo。
So I deleted the folder of the old version on the first machine (backed up to a local folder beforehand). 所以我在第一台机器上删除了旧版本的文件夹(事先备份到本地文件夹)。 Then I did
git pull origin master
to pull the project from the github repo. 然后我做了
git pull origin master
从github repo中拉出项目。 I did npm install
, npm audit fix
and npm audit -f fix
to get rid of vulnerabilities. 我做了
npm install
, npm audit fix
和npm audit -f fix
来摆脱漏洞。
This project uses webpack and vue-cli so I put npm run dev
into the terminal and now I'm getting an error without any information about why the error is happening. 这个项目使用webpack和vue-cli,所以我把
npm run dev
放到终端中,现在我收到一个错误,没有任何关于错误发生原因的信息。
Here is the github repo, follow the steps I just described to reproduce. 这是github repo,按照我刚才描述的步骤重现。
https://github.com/adamcole123/pharaoh-web-app https://github.com/adamcole123/pharaoh-web-app
Thanks in advance! 提前致谢!
EDITS: EDITS:
I feel like it may be something to do with global dependencies, but i have no idea what they would be. 我觉得它可能与全局依赖关系有关,但我不知道它们会是什么。 So if anyone knows that would be great :)
所以,如果有人知道这将是伟大的:)
(i forgot to add the error that i got): (我忘了添加我得到的错误):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pharaoh-web-app@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pharaoh-web-app@1.0.0 dev 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\Adam\AppData\Roaming\npm-cache\_logs\2019-04-06T14_44_39_545Z-debug.log
and the debug log it references: 以及它引用的调试日志:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle pharaoh-web-app@1.0.0~predev: pharaoh-web-app@1.0.0
6 info lifecycle pharaoh-web-app@1.0.0~dev: pharaoh-web-app@1.0.0
7 verbose lifecycle pharaoh-web-app@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle pharaoh-web-app@1.0.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\nodeprojects\pharaoh-web-app\node_modules\.bin;C:\Users\Adam\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\MATLAB\R2018b\runtime\win64;C:\Program Files\MATLAB\R2018b\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\Adam\AppData\Local\Microsoft\WindowsApps;C:\Users\Adam\AppData\Local\Programs\Python\Python37-32;C:\Program Files\MongoDB\Server\4.0\bin;;C:\Users\Adam\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Adam\AppData\Roaming\npm
9 verbose lifecycle pharaoh-web-app@1.0.0~dev: CWD: C:\nodeprojects\pharaoh-web-app
10 silly lifecycle pharaoh-web-app@1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle pharaoh-web-app@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle pharaoh-web-app@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: pharaoh-web-app@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid pharaoh-web-app@1.0.0
15 verbose cwd C:\nodeprojects\pharaoh-web-app
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.15.3
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error pharaoh-web-app@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
22 error Exit status 1
23 error Failed at the pharaoh-web-app@1.0.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 ]
Please try .\\node_modules\\.bin\\eslint
(the path separator is \\ on Windows) or eslint-cli . 请尝试
.\\node_modules\\.bin\\eslint
(路径分隔符在Windows上为\\)或eslint-cli 。
I think this will help you: https://github.com/eslint/eslint/issues/10176 我想这会对你有所帮助: https : //github.com/eslint/eslint/issues/10176
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.