vue-cli 脚手架项目运行报错
npm run dev:h5
unidemo@0.1.0 dev:h5 D:\My_project_folder\uni-app-cli\demo\unidemo
cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve
请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。
INFO Starting development server...
ERROR TypeError: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
at Function.assign (<anonymous>)
at D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@dcloudio\vue-cli-plugin-uni\lib\chain-webpack.js:30:32
at Object.tap (D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\webpack-chain\src\Use.js:14:20)
at D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@dcloudio\vue-cli-plugin-uni\lib\chain-webpack.js:30:10
at Array.forEach (<anonymous>)
at D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@dcloudio\vue-cli-plugin-uni\lib\chain-webpack.js:25:17
at D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@vue\cli-service\lib\Service.js:268:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@vue\cli-service\lib\Service.js:268:26)
at Service.resolveWebpackConfig (D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@vue\cli-service\lib\Service.js:272:48)
at PluginAPI.resolveWebpackConfig (D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@vue\cli-service\lib\PluginAPI.js:132:25)
at serve (D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@dcloudio\vue-cli-plugin-uni\commands\serve.js:51:31)
at Service.run (D:\My_project_folder\uni-app-cli\demo\unidemo\node_modules\@vue\cli-service\lib\Service.js:262:12)
at processTicksAndRejections (internal/process/task_queues.js:89:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! unidemo@0.1.0 dev:h5: cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the unidemo@0.1.0 dev:h5 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! D:\software_package\Node\node_cache_logs\2022-03-17T10_10_20_422Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! unidemo@0.1.0 serve: npm run dev:h5
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the unidemo@0.1.0 serve 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! D:\software_package\Node\node_cache_logs\2022-03-17T10_10_20_468Z-debug.log
2 个回复
d***@126.com
你好,我也遇到了这个问题,请问你怎么解决的啊
1***@qq.com
我也遇到这个问题了,参考了一篇文章,但是还是没有解决,请问有解决的方案吗?
参考文章链接:https://ask.dcloud.net.cn/question/139877
报错信息如下:
请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。
INFO Starting development server...
ERROR TypeError: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
at Function.assign (<anonymous>)
at D:\SL_EA\el-app-clia\node_modules\@dcloudio\vue-cli-plugin-uni\lib\chain-webpack.js:53:34
at Object.tap (D:\SL_EA\el-app-clia\node_modules\webpack-chain\src\Use.js:14:20)
at D:\SL_EA\el-app-clia\node_modules\@dcloudio\vue-cli-plugin-uni\lib\chain-webpack.js:53:12
at Array.forEach (<anonymous>)
at D:\SL_EA\el-app-clia\node_modules\@dcloudio\vue-cli-plugin-uni\lib\chain-webpack.js:22:17
at D:\SL_EA\el-app-clia\node_modules\@vue\cli-service\lib\Service.js:268:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (D:\SL_EA\el-app-clia\node_modules\@vue\cli-service\lib\Service.js:268:26)
at Service.resolveWebpackConfig (D:\SL_EA\el-app-clia\node_modules\@vue\cli-service\lib\Service.js:272:48)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! el-app-clia@0.1.0 dev:h5:
cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve
npm ERR! Exit status 1
npm ERR! Failed at the el-app-clia@0.1.0 dev:h5 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\huangqj\AppData\Roaming\npm-cache_logs\2023-01-17T08_26_46_667Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! el-app-clia@0.1.0 serve:
npm run dev:h5
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the el-app-clia@0.1.0 serve 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\huangqj\AppData\Roaming\npm-cache_logs\2023-01-17T08_26_46_871Z-debug.log