为我的 vue 项目设置 vuepress 没问题,希望你 vue-styleguidist 自动记录所有内容。使用 vuepress 在 /docs/ 中安装它及其依赖项,但我不明白下面的 webpack 验证错误。
命令
npm run styleguide
导致以下错误,我似乎无法弄清楚。
ERROR ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'setImmediate'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dgram'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'setImmediate'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dgram'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
at validate (..\docs\node_modules\webpack\node_modules\schema-utils\dist\validate.js:105:11)
at validateSchema (..\docs\node_modules\webpack\lib\validateSchema.js:78:2)
at create (..\docs\node_modules\webpack\lib\webpack.js:109:24)
at webpack (..\docs\node_modules\webpack\lib\webpack.js:151:32)
at f (..\docs\node_modules\webpack\lib\index.js:55:16)
at createServer (..\docs\node_modules\vue-styleguidist\lib\scripts\create-server.js:45:42)
at server (C..\docs\node_modules\vue-styleguidist\lib\scripts\server.js:14:49)
at Object.commandServer (..\docs\node_modules\vue-styleguidist\lib\scripts\binutils.js:130:41)
at Object.server (..\docs\node_modules\vue-styleguidist\lib\scripts\index.js:88:25)
at ..\docs\node_modules\vue-cli-plugin-styleguidist\index.js:49:64
at Service.run (..\docs\node_modules\@vue\cli-service\lib\Service.js:230:12)
at Object.<anonymous> (..\docs\node_modules\@vue\cli-service\bin\vue-cli-service.js:36:9)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)