webpack打包报错

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.module has an unknown property ‘loaders‘. These properties are valid: object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? } -> Options affecting the normal modules (`NormalModuleFactory`).

  

解决方法:将module中的loaders替换为rules

原文地址:https://www.cnblogs.com/detanx/p/webpackError.html

时间: 2024-10-12 13:22:20

webpack打包报错的相关文章

webpack 打包报错:One CLI for webpack must be installed. These are recommended choices, delivered as separate packages

webpack 打包报错: One CLI for webpack must be installed. These are recommended choices, delivered as separate packages: 解决办法: 全局.局部安装个遍!具体什么原因还不清楚... 先全局安装webpack和webpack-clinpm install webpack -gnpm install webpack-cli -g再局部安装webpack和webpack-clinpm inst

关于Webpack打包报错Class constructor FileManager cannot be invoked witchout 'new'

前端代码部署一直是自己打包之后将文件用FileZilla上传到服务器上,现在改用运维基于到k8s docker镜像的发布,前端打包报错如下: 经查资料,报错原因是less升级导致的Bug 尝试升级less-loader到5.0.0已解决上面问题. 关于Webpack打包报错Class constructor FileManager cannot be invoked witchout 'new' 原文地址:https://www.cnblogs.com/vikki7/p/11392744.htm

webpack打包报错Unexpected token

最近项目要上线,需要对项目进行打包部署到服务器上面,在打包过程中npm run build后出现以下报错Unexpected token: punc (() [./~/[email protected]@element-ui/packages/col/src/col.js:23,0][static/js/0.3fbe30ed5a683f62d6bc.js:13890,10] 字面意思是报错来自UglifyJs,在col.js下23行出现了不期望的'(',打开col.js文件查看 不能识别这个函数

webpack打包---报错内存溢出javaScript heap out of memory

今天, npm run build打包时,又报内存溢出了.所以记录一下,之前查了博客有一些解释. “报错CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory是 JavaScript堆内存不足,这里说的 JavaScript 其实就是 Node,我们都知道 Node 是基于V8引擎,在一般的后端开发语言中,在基本的内存使用上没有什么限制. 但是我去查阅了相关的资料才发现,在 Node 中通过 JavaScript

webpack打包时报错:Support for the experimental syntax 'classProperties' isn't currently enabled

在写react项目创建class时使用了静态属性,但是在打包的时候报错: 根据报错提示下载@babel/plugin-proposal-class-properties包,并在.babelrc文件中的"plugins"里添加一项"@babel/plugin-proposal-class-properties" { "presets": ["@babel/preset-env", "@babel/preset-reac

Android打包报错 Export aborted because fatal lint errors were found. These are listed in the Lint View

打包时报如下错误: Export aborted because fatal lint errors were found. These are listed in the Lint View. Either fix these before running Export again,or turn off"Run full error check when exporting app" in the Android > Lint Error Checking preferenc

webpack编译报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./../../node_modules..

在同事的mac电脑上,可以正常编译,拿到我这边就出错了(⊙﹏⊙) 好像是webpack在window下的一个bug,需要让 webpack 和你的项目保持在一个盘符下,参考. 解决方法: 修改config.js配置文件,在所有目录前加上path.join,参考1,参考2. webpack编译报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./../../node_modules..

Unity3D 程序打包报错(程序是连接数据库进行处理的)

打包这个Unity3D的程序时出现错误(程序是由XML数据改成连接数据库): ArgumentException: The Assembly System.Configuration is referenced by System.Data. But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (Syst

maven install 打包 报错 Cannot run program "gpg.exe": CreateProcess error

打包报错, mvn install后加上参数-Dgpg.skip,例如:mvn install -Dgpg.skip   即可解决. 我们也可以去掉 这个 插件   <plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-gpg-plugin</artifactId>                &l