Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Cannot read property 'properties' of undefined #2

Closed
kikyo20 opened this issue Oct 11, 2018 · 1 comment
Closed

Cannot read property 'properties' of undefined #2

kikyo20 opened this issue Oct 11, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@kikyo20
Copy link

kikyo20 commented Oct 11, 2018

不能正常npm run dev npm run build,错误是一样的
错误信息如下:

PS D:\webpackproject\webpack-mpa-sample-master> npm run dev

> webpack-mpa-sample@1.0.0 dev D:\webpackproject\webpack-mpa-sample-master
> webpack-dev-server --config webpack.dev.js

D:\webpackproject\webpack-mpa-sample-master\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 (D:\webpackproject\webpack-mpa-sample-master\node_modules\webpack-cli\bin\config-yargs.js:89:48)
    at Object.<anonymous> (D:\webpackproject\webpack-mpa-sample-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:236:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:560:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-mpa-sample@1.0.0 dev: `webpack-dev-server --config webpack.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-mpa-sample@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\PC2018\AppData\Roaming\npm-cache\_logs\2018-10-11T01_34_53_195Z-debug.log
PS D:\webpackproject\webpack-mpa-sample-master> npm run build

> webpack-mpa-sample@1.0.0 build D:\webpackproject\webpack-mpa-sample-master
> webpack --config webpack.prod.js

D:\webpackproject\webpack-mpa-sample-master\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 (D:\webpackproject\webpack-mpa-sample-master\node_modules\webpack-cli\bin\config-yargs.js:89:48)
    at D:\webpackproject\webpack-mpa-sample-master\node_modules\webpack-cli\bin\webpack.js:60:27
    at Object.<anonymous> (D:\webpackproject\webpack-mpa-sample-master\node_modules\webpack-cli\bin\webpack.js:515:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-mpa-sample@1.0.0 build: `webpack --config webpack.prod.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-mpa-sample@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\PC2018\AppData\Roaming\npm-cache\_logs\2018-10-11T01_37_40_448Z-debug.log
PS D:\webpackproject\webpack-mpa-sample-master>

已经npm install安装依赖了

@Lsnsh
Copy link
Owner

Lsnsh commented Nov 19, 2018

webpack升级到v4.20.0导致到,将webpack-cli升级到3.1.1及以上即可
webpack/webpack#8082 (comment)

@Lsnsh Lsnsh closed this as completed Nov 19, 2018
@Lsnsh Lsnsh reopened this Nov 19, 2018
@Lsnsh Lsnsh closed this as completed in d50a4ec Nov 19, 2018
@Lsnsh Lsnsh added question Further information is requested bug Something isn't working wontfix This will not be worked on and removed question Further information is requested wontfix This will not be worked on labels Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants