Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

npm scripts throwing errors #264

Closed
mischah opened this issue Oct 22, 2018 · 4 comments
Closed

npm scripts throwing errors #264

mischah opened this issue Oct 22, 2018 · 4 comments
Labels

Comments

@mischah
Copy link
Member

mischah commented Oct 22, 2018

The build process fails after a fresh install with the following error:

TypeError: Cannot read property 'properties' of undefined

It’s caused by a bug introduced in webpack 4.20.0 (See webpack/webpack#8082)

Current workaround

Install and use webpack 4.19.0:

npm i -D webpack@4.19.0

Sorry for the inconvenience.

Complete error log in the Terminal:

$ npm run start

> testchen@0.0.0 start /Users/mkuehnel/temp/testchen
> npm-run-all clean:dev handlebars --parallel handlebars:watch webpack:server eslint:watch stylelint:watch --silent

✔  Finished Handlebars build after 167 ms

/Users/mkuehnel/temp/testchen/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 (/Users/mkuehnel/temp/testchen/node_modules/webpack-cli/bin/config-yargs.js:89:48)
    at Object.<anonymous> (/Users/mkuehnel/temp/testchen/node_modules/webpack-dev-server/bin/webpack-dev-server.js:84:40)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testchen@0.0.0 start: `npm-run-all clean:dev handlebars --parallel handlebars:watch webpack:server eslint:watch stylelint:watch --silent`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testchen@0.0.0 start 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!     /Users/mkuehnel/.npm/_logs/2018-10-21T21_10_58_615Z-debug.log
@pengyan518
Copy link

pengyan518 commented Nov 29, 2018

I have the same problem. I can run "npm run start", it works , but when I run "npm run build",
it shows the error:

$ npm run build

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webapp@0.0.0 build: npm-run-all security test handlebars clean webpack --silent
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webapp@0.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!     /Users/jwang/.npm/_logs/2018-11-29T14_24_34_143Z-debug.log

in package.json:

"webpack": "4.19.0",
"webpack-assets-manifest": "^3.0.0",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.5"

@ematipico
Copy link

Upgrading webpack-cli to the latest will solve the issue

@mischah
Copy link
Member Author

mischah commented Feb 8, 2019

Thanks @ematipico 💯

@mischah
Copy link
Member Author

mischah commented Feb 11, 2019

The current master branch builds correctly with Node 6, 8, 10 and 11 and a proper release will follow within this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants