我克隆了这个github项目:github project 我在全球安装了webpack。 “我不确定这是不是问题,因为我尝试使用本地版本的webpack,但它仍然无法正常工作”
我无法运行该项目。我的印象是,如果您从项目中下载所有内容,则package.json
和所有configuration
文件应提供npm需要执行“安装”和运行项目的所有详细信息。我错过了别的什么吗?
我尝试使用
运行项目npm运行web-dev
这是输出npm-debug.log
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 'web-dev' ]
2 info using npm@3.10.10
3 info using node@v6.11.0
4 verbose run-script [ 'preweb-dev', 'web-dev', 'postweb-dev' ]
5 info lifecycle ClubApp@0.0.1~preweb-dev: ClubApp@0.0.1
6 silly lifecycle ClubApp@0.0.1~preweb-dev: no script for preweb-dev, continuing
7 info lifecycle ClubApp@0.0.1~web-dev: ClubApp@0.0.1
8 verbose lifecycle ClubApp@0.0.1~web-dev: unsafe-perm in lifecycle true
9 verbose lifecycle ClubApp@0.0.1~web-dev: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\clark\Documents\Test\ClubApp\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\clark\AppData\Local\Microsoft\WindowsApps;C:\Users\clark\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin
10 verbose lifecycle ClubApp@0.0.1~web-dev: CWD: C:\Users\clark\Documents\Test\ClubApp
11 silly lifecycle ClubApp@0.0.1~web-dev: Args: [ '/d /s /c',
11 silly lifecycle 'webpack-dev-server --content-base web/public/ --config web/webpack/web.dev.config.js --port 3001 --inline --hot --colors' ]
12 silly lifecycle ClubApp@0.0.1~web-dev: Returned: code: 1 signal: null
13 info lifecycle ClubApp@0.0.1~web-dev: Failed to exec web-dev script
14 verbose stack Error: ClubApp@0.0.1 web-dev: `webpack-dev-server --content-base web/public/ --config web/webpack/web.dev.config.js --port 3001 --inline --hot --colors`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:891:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ClubApp@0.0.1
16 verbose cwd C:\Users\clark\Documents\Test\ClubApp
17 error Windows_NT 10.0.15063
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "web-dev"
19 error node v6.11.0
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error ClubApp@0.0.1 web-dev: `webpack-dev-server --content-base web/public/ --config web/webpack/web.dev.config.js --port 3001 --inline --hot --colors`
22 error Exit status 1
23 error Failed at the ClubApp@0.0.1 web-dev script 'webpack-dev-server --content-base web/public/ --config web/webpack/web.dev.config.js --port 3001 --inline --hot --colors'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ClubApp package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack-dev-server --content-base web/public/ --config web/webpack/web.dev.config.js --port 3001 --inline --hot --colors
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ClubApp
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ClubApp
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
答案 0 :(得分:1)
请在尝试运行npm install
npm run web-dev