简体   繁体   English

当我从github repo克隆时,为什么我的webpack项目无法构建?

[英]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 installnpm audit fixnpm 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.

相关问题 为什么 heroku 无法在项目上编译构建? - why does heroku fail to compile build on project? 为什么我的 Github 密码失败(每个事件都更改)? - Why does my Github secret fail (change on each event)? 从heroku将Keystone应用程序克隆到本地存储库时,为什么会得到空的存储库? - Why am I getting an empty repo when cloning my keystone app to local repo from heroku? 为什么 heroku 我的构建失败并说它在本地工作时找不到文件? - Why does heroku fail my build and says it cannot find a file when it works locally? 如何从github repo克隆然后在puppet上运行npm install - How to clone from a github repo and then run npm install on puppet 当我在本地构建它时,我的应用程序部署在 on.netlify 但当我从 github 部署它时它不起作用 - my application deploys on netlify when i build it locally but it doesnt work when i deploy it from github 当子模块构建失败时,NPM为什么会成功? - Why does NPM success when submodules fail to build? 使用shelljs克隆git repo时为什么会出现NullReferenceException? - Why do I get a NullReferenceException when using shelljs to clone a git repo? @ shopify / polaris项目如何从github仓库构建为npm依赖项? - How does the @shopify/polaris project get built from github repo to npm dependency? “ npm run build”如何在jquery github repo中运行脚本? - How does “npm run build” run the scripts in jquery github repo?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM