1、错误描述
C:\Users\Administrator>cd D:\Vue2 C:\Users\Administrator>d: D:\Vue2>npm install npm WARN saveError ENOENT: no such file or directory, open 'D:\Vue2\package.json ' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open 'D:\Vue2\package.json' npm WARN Vue2 No description npm WARN Vue2 No repository field. npm WARN Vue2 No README data npm WARN Vue2 No license field. up to date in 2.276s [+] no known vulnerabilities found [0 packages audited] D:\Vue2>cd webpack-develop D:\Vue2\webpack-develop>npm install npm WARN [email protected] No repository field. added 264 packages from 219 contributors in 26.498s [!] 8 vulnerabilities found [460 packages audited] Severity: 2 Low | 5 Moderate | 1 High Run `npm audit` for more detail D:\Vue2\webpack-develop>npm run dev npm ERR! missing script: dev npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-02T0 8_57_24_954Z-debug.log D:\Vue2\webpack-develop>npm run dev npm ERR! file D:\Vue2\webpack-develop\package.json npm ERR! code EJSONPARSE npm ERR! JSON.parse Failed to parse json npm ERR! JSON.parse Unexpected token � in JSON at position 291 while parsing ne ar '...sh ./deploy-docs.sh"�� npm ERR! JSON.parse "start": "web...' npm ERR! JSON.parse Failed to parse package.json data. npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-02T0 9_02_24_264Z-debug.log D:\Vue2\webpack-develop>npm run dev npm ERR! missing script: dev npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-02T0 9_03_01_728Z-debug.log D:\Vue2\webpack-develop>npm run docs > [email protected] docs D:\Vue2\webpack-develop > cd docs && gitbook serve 'gitbook' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] docs: `cd docs && gitbook serve` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] docs script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-02T0 9_04_43_873Z-debug.log D:\Vue2\webpack-develop>npm run dev > [email protected] dev D:\Vue2\webpack-develop > node build/dev-server.js internal/modules/cjs/loader.js:596 throw err; ^ Error: Cannot find module 'D:\Vue2\webpack-develop\build\dev-server.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15) at Function.Module._load (internal/modules/cjs/loader.js:520:25) at Function.Module.runMain (internal/modules/cjs/loader.js:744:10) at startup (internal/bootstrap/node.js:238:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dev: `node build/dev-server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] dev script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-02T0 9_12_24_087Z-debug.log D:\Vue2\webpack-develop>npm run dev > [email protected] dev D:\Vue2\webpack-develop > node template/build/webpack.dev.conf.js D:\Vue2\webpack-develop\template\config\index.js:23 {{#lint}}// Use Eslint Loader? ^ SyntaxError: Unexpected token { at new Script (vm.js:74:7) at createScript (vm.js:246:10) at Object.runInThisContext (vm.js:298:10) at Module._compile (internal/modules/cjs/loader.js:670:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dev: `node template/build/webpack.dev.co nf.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] dev script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-06-02T0 9_45_19_482Z-debug.log D:\Vue2\webpack-develop>
2、错误原因
3、解决办法