当我从github存储库克隆时,为什么我的webpack项目无法构建? [英] Why does my webpack project fail to build when i clone from github repo?

查看:79
本文介绍了当我从github存储库克隆时,为什么我的webpack项目无法构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我在一个机器上有一个项目的旧版本,这是一个正在使用另一台机器进行工作的github回购项目.

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.

因此,我在第一台计算机上删除了旧版本的文件夹(已预先备份到本地文件夹).然后,我做了git pull origin master从github存储库中提取了项目.我做了npm installnpm audit fixnpm audit -f fix来消除漏洞.

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. I did npm install, npm audit fix and npm audit -f fix to get rid of vulnerabilities.

该项目使用webpack和vue-cli,所以我将npm run dev放入终端,现在我收到一个错误,但没有任何有关错误发生原因的信息.

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.

这是github仓库,请按照我刚才描述的步骤进行复制.

Here is the github repo, follow the steps I just described to reproduce.

https://github.com/adamcole123/pharaoh-web-app

提前谢谢!

我觉得这可能与全局依赖有关,但是我不知道它们会是什么.因此,如果有人知道那会很棒:)

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

及其引用的调试日志:

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 ]

推荐答案

请尝试.\node_modules\.bin\eslint(Windows上的路径分隔符为\)或

Please try .\node_modules\.bin\eslint (the path separator is \ on Windows) or eslint-cli.

我认为这将帮助您: https://github.com/eslint/eslint/issues/10176

I think this will help you: https://github.com/eslint/eslint/issues/10176

这篇关于当我从github存储库克隆时,为什么我的webpack项目无法构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆