NPM运行启动,Webpack服务器问题-'TypeError:无法读取未定义的属性'properties'

时间:2018-11-07 12:18:20

标签: node.js reactjs npm webpack webpack-dev-server

我正在尝试使用命令npm run start运行npm,但是出现webpack开发服务器尝试打开时似乎正在发生的错误:

> election@1.0.0 start C:\Users\Aristophanes\election_react\election_react-0.0.1
> webpack-dev-server --open

C:\Users\Aristophanes\election_react\election_react-0.0.1\node_modules\webpack-cli\bin\config-yargs.js:89
                                describe: optionsSchema.definitions.output.properties.path.description,
                                                                           ^

TypeError: Cannot read property 'properties' of undefined
    at module.exports (C:\Users\Aristophanes\election_react\election_react-0.0.1\node_modules\webpack-cli\bin\config-yargs.js:89:48)
    at Object.<anonymous> (C:\Users\Aristophanes\election_react\election_react-0.0.1\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! election@1.0.0 start: `webpack-dev-server --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the election@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我已经运行npm install -g webpack-dev-server,因为这已经解决了类似错误,但是问题仍然存在。有人可以帮忙吗?谢谢。

0 个答案:

没有答案