wxapp-boilerplate
wxapp-boilerplate copied to clipboard
npm run build 出错,怎么办哟
D:\myProject\abc\wxapp-boilerplate-master>npm run build
[email protected] prebuild D:\myProject\abc\wxapp-boilerplate-master rimraf dist
[email protected] build D:\myProject\abc\wxapp-boilerplate-master run-s build:*
[email protected] build:wechat D:\myProject\abc\wxapp-boilerplate-master cross-env NODE_ENV=production webpack --env.target=Wechat --env.min
TypeError: Cannot read property 'replace' of undefined
at D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\NormalModuleFactory.js:106:27
at D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\NormalModuleFactory.js:59:4
at applyPluginsAsyncWaterfall (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\NormalModuleFactory.js:236:4)
at D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\node_modules\tapable\lib\Tapable.js:268:11
at IgnorePlugin.checkIgnore (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\IgnorePlugin.js:56:10)
at NormalModuleFactory.applyPluginsAsyncWaterfall (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\node_modules\tapable\lib\Tapable.js:272:13)
at NormalModuleFactory.create (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\NormalModuleFactory.js:220:8)
at semaphore.acquire (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compilation.js:407:18)
at Semaphore.acquire (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\util\Semaphore.js:16:4)
at Compilation._addModuleChain (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compilation.js:406:18)
at Compilation.addEntry (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compilation.js:494:8)
at Compiler.compiler.plugin (D:\myProject\abc\wxapp-boilerplate-master\node_modules\wxapp-webpack-plugin\lib\index.js:460:16)
at Compiler.applyPluginsParallel (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\node_modules\tapable\lib\Tapable.js:293:14)
at applyPluginsAsync.err (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compiler.js:499:9)
at Compiler.applyPluginsAsyncSeries (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\node_modules\tapable\lib\Tapable.js:195:46)
at Compiler.compile (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compiler.js:492:8)
at readRecords.err (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compiler.js:279:11)
at Compiler.readRecords (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compiler.js:391:11)
at applyPluginsAsync.err (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\Compiler.js:276:10)
at next (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\node_modules\tapable\lib\Tapable.js:202:11)
at Compiler.compiler.plugin (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\lib\CachePlugin.js:51:59)
at next (D:\myProject\abc\wxapp-boilerplate-master\node_modules\webpack\node_modules\tapable\lib\Tapable.js:204:14)
at Compiler.cross-env NODE_ENV=production webpack --env.target=Wechat --env.min
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:wechat 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\Eden\AppData\Roaming\npm-cache_logs\2018-08-24T04_19_18_604Z-debug.log
ERROR: "build:wechat" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: run-s build:*
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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:
我的是一个原生开发的小程序,准备用webpack去build一下,复制到wxapp-boilerplate的src下替换了里边内容,打包出的问题。。
请问你的 webpack 和 node.js 版本分别是多少?是使用 yarn 安装还是 npm 安装?