-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安装完脚手架,开发运行报错 #12
Comments
发下你的webpack config?cli创建项目时是一路回车下来的吗? |
检查一下是不是手动往配置里敲了一个‘1’,脚手架生成的配置中不应该存在这种属性 |
得到
|
npm run watch报错了? 为啥npm run build命令是好的呢 |
@sky-admin @loo41 大佬有正确的模版配置吗 |
因为build并没有执行这个
|
我重新下生成了一下项目 发现 一路回车 在plugins 插件这个选项的时候选择 no 生成的命令 |
已复现问题,正在解决,正常开发需求一般应该选择非插件模式,我们默认提供的选项也是No。。 |
已解决。重新init项目即可。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
webpack不是4.0以上吗?
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, externals?, loader?, mode?, module?, name?, node?, optimization?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, serve?, stats?, target?, watch?, watchOptions? }
For typos: please correct them.
For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: [
new webpack.LoaderOptionsPlugin({
// test: /.xxx$/, // may apply this only for some modules
options: {
1: …
}
})
]
at webpack (/Users/chason/Desktop/mpx/node_modules/webpack/lib/webpack.js:31:9)
at runWebpack (/Users/chason/Desktop/mpx/build/build.js:30:5)
at err (/Users/chason/Desktop/mpx/build/build.js:58:3)
at afterGlob (/Users/chason/Desktop/mpx/node_modules/rimraf/rimraf.js:84:14)
at f (/Users/chason/Desktop/mpx/node_modules/once/once.js:25:25)
at Glob. (/Users/chason/Desktop/mpx/node_modules/glob/glob.js:151:7)
at Glob.emit (events.js:182:13)
at Glob._finish (/Users/chason/Desktop/mpx/node_modules/glob/glob.js:197:8)
at done (/Users/chason/Desktop/mpx/node_modules/glob/glob.js:182:14)
at Glob._processReaddir2 (/Users/chason/Desktop/mpx/node_modules/glob/glob.js:408:12)
at /Users/chason/Desktop/mpx/node_modules/glob/glob.js:371:17
at RES (/Users/chason/Desktop/mpx/node_modules/inflight/inflight.js:31:16)
at f (/Users/chason/Desktop/mpx/node_modules/once/once.js:25:25)
at Glob._readdirEntries (/Users/chason/Desktop/mpx/node_modules/glob/glob.js:578:10)
at /Users/chason/Desktop/mpx/node_modules/glob/glob.js:555:12
at FSReqWrap.oncomplete (fs.js:141:20)
The text was updated successfully, but these errors were encountered: