这里是文章模块栏目内容页
npm报错 This is probably not a problem with npm,there is likely additional logging output above可能的原因

npm WARN Local package.json exists, but node_modules missing, did you mean to install?

0 info it worked if it ends with ok
1 verbose cli [
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   'build'
1 verbose cli ]
2 info using npm@6.12.0
3 info using node@v12.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle dweb@1.0.0~prebuild: dweb@1.0.0
6 info lifecycle dweb@1.0.0~build: dweb@1.0.0
7 verbose lifecycle dweb@1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle dweb@1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;
D:\nodejswww\902\101\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Python39\Scripts\;C:\Python39\;
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python38\Scripts\;C:\Python38\;
C:\Program Files (x86)\NetSarang\Xshell 6\;
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;
C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk-11.0.4\bin;
C:\Program Files\Java\jdk-11.0.4\jre\bin;D:\JavaEclipseWorkspace\apache-maven-3.6.1\bin;
C:\ProgramData\chocolatey\bin;C:\cygwin64\bin;C:\ProgramData\ComposerSetup\bin;C:\Go\bin;
C:\Program Files\Git\cmd;D:\BtSoft\WebSoft\php\php7.2.31;C:\Program Files\nodejs\;
C:\Users\Dell\.windows-build-tools\python27\;C:\Users\Dell\AppData\Local\Microsoft\WindowsApps;
C:\Users\Dell\AppData\Roaming\Composer\vendor\bin;C:\Users\Dell\AppData\Local\Programs\Microsoft VS Code\bin;
C:\Users\Dell\go\bin;C:\Users\Dell\AppData\Roaming\npm;C:\Users\Dell\AppData\Local\Microsoft\WindowsApps;C:\ffmpeg\bin
9 verbose lifecycle dweb@1.0.0~build: CWD: D:\nodejswww\902\101
10 silly lifecycle dweb@1.0.0~build: Args: [ '/d /s /c', 'node build/build.js' ]
11 silly lifecycle dweb@1.0.0~build: Returned: code: 1  signal: null
12 info lifecycle dweb@1.0.0~build: Failed to exec build script
13 verbose stack Error: dweb@1.0.0 build: `node build/build.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:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
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:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid dweb@1.0.0
15 verbose cwd D:\nodejswww\902\101
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v12.13.0
19 verbose npm  v6.12.0
20 error code ELIFECYCLE
21 error errno 1
22 error dweb@1.0.0 build: `node build/build.js`
22 error Exit status 1
23 error Failed at the dweb@1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

 

解决方法:

输入npm install 或 cnpm install 后,再次启动

npm run dev 成功启动!

2
10% building 8/9 modules 1 active …web.0.9.2\node_modules\lodash\lodash.jsevents.js:183
Error: getaddrinfo ENOTFOUND dev.maxim.top at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

 

解决办法:Error: getaddrinfo ENOTFOUND dev.maxim.top at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

错误提示,应该是无法去访问dev.maxim.top,然后去全局搜索dev.maxim.top,发现在webpack.dev.config.js文件中有,由于这

个dev.maxim.top无法访问而导致的,我们只需将dev.maxim.top改成localhost,重新 npm run dev 就可以成功启动了。
npm 报错This is probably not a problem with npm. There is likely additional logging output above.

可能是版本的问题

重新 npm install

然后 npm i -D webpack-dev-server@3.0.0

再 npm run dev

重新安装一次,如果还是不可以的话,在把之前装的都清空

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install

然后对项目进行npm install,在项目中会生成一个文件夹如下:

此时再执行npm start 项目就启动起来