使用nwjs打包报错Cannot extract package 是啥原因

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用nwjs打包报错Cannot extract package 是啥原因相关的知识,希望对你有一定的参考价值。

参考技术A 估计设置了NLS_LANG环境变量,却又没有设置正确吧?试试将其修改正确(比如简体中文是:SIMPLIFIED CHINESE_CHINA.ZHS16GBK);或者干脆不要设置这个环境变量,使用系统默认值。

node 报错:Uncaught Error: Cannot find module "!!../../../node_modules/extract-webpack-plugin/load

问题出在缺少less和less-loader  因为以上模块使用了less解析。

解决方法在dependencies添加

"less": "^2.7.1",
"less-loader": "^2.2.3"

 

以上是关于使用nwjs打包报错Cannot extract package 是啥原因的主要内容,如果未能解决你的问题,请参考以下文章

node 报错:Uncaught Error: Cannot find module "!!../../../node_modules/extract-webpack-plugin/load

electron使用electron-forge打包后报错cannot find module ‘XXX’

Vue 打包后报错 Uncaught TypeError: Cannot redefine property: $router

Vue 打包后报错 Uncaught TypeError: Cannot redefine property: $router

nwjs-打包

使用webpack命令打包时,报错TypeError: Cannot read property 'presetToOptions' of undefined的解决办法