You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cross-env NODE_ENV=staging yarn build:h5
$ taro build --type h5
👽 Taro v3.5.2
当前运行环境: staging
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.mode should be one of these:
"development" | "production" | "none"
-> Enable production optimizations or development hints.
at validate (/Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/webpack/node_modules/schema-utils/dist/validate.js:105:11)
at validateSchema (/Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/webpack/lib/validateSchema.js:78:2)
at create (/Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/webpack/lib/webpack.js:111:24)
at webpack (/Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/webpack/lib/webpack.js:158:32)
at f (/Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/webpack/lib/index.js:63:16)
at /Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/@tarojs/webpack5-runner/src/index.h5.ts:41:31
at Generator.next (<anonymous>)
at fulfilled (/Users/yanghc/Work/ParsecProject/sculptor-h5/node_modules/@tarojs/webpack5-runner/dist/index.h5.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errors: [
{
keyword: 'enum',
dataPath: '.mode',
schemaPath: '#/definitions/Mode/enum',
params: [Object],
message: 'should be equal to one of the allowed values',
schema: [Array],
parentSchema: [Object],
data: 'staging'
}
],
相关平台
H5
浏览器版本: Chrome 版本 104.0.5112.101(正式版本) (x86_64)
使用框架: React
复现步骤
自定义一个环境变量,进行编译运行就会报错.
期望结果
正常打包运行
实际结果
环境信息
The text was updated successfully, but these errors were encountered: