vingojw / vue1_demo

Vue, vue-router, Webpack 和 vue-loader

Home Page:https://vingojw.cc/vue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm run dev error

opened this issue · comments

Unhandled rejection Error: ENOENT: no such file or directory, open 'build/assets.json'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.writeFileSync (fs.js:1224:33)
at Compiler. (/study/webpack-study/examples/vue-vueRouter-webpack/webpack.config.js:59:19)
at Compiler.applyPlugins (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/tapable/lib/Tapable.js:26:37)
at Watching._done (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:78:17)
at Watching. (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:61:18)
at Compiler.emitRecords (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:282:37)
at Watching. (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:58:19)
at /study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:275:11
at Compiler.applyPluginsAsync (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/tapable/lib/Tapable.js:60:69)
at Compiler.afterEmit (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:272:8)
at Compiler. (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/webpack/lib/Compiler.js:267:14)
at /study/webpack-study/examples/vue-vueRouter-webpack/node_modules/async/lib/async.js:52:16
at Object.async.forEachOf.async.eachOf (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/async/lib/async.js:236:30)
at Object.async.forEach.async.each (/study/webpack-study/examples/vue-vueRouter-webpack/node_modules/async/lib/async.js:209:22)

commented

已修复。之前是想在webpack运行结束之后,拿到文件的hash值。
https://github.com/vingojw/vue-vueRouter-webpack/blob/master/webpack.config.js#L59