Laravel-mix: Error: custom keyword definition is invalid: data/errors should be boolean

Created on 10 Feb 2019  路  5Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 4.0.14
  • Node Version (node -v): v8.11.4
  • NPM Version (npm -v): 6.7.0
  • OS: Windows 10

Description:

When I run npm run dev or npm run prod on a fresh Laravel installation, I've got the following exception:

`> npm run development

@ development C:\Apache24\htdocs\rescue
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

C:\Apache24\htdocs\rescue\node_moduleswebpack-cli\bin\cli.js:231
throw err;
^

Error: custom keyword definition is invalid: data/errors should be boolean
at Ajv.addKeyword (C:\Apache24\htdocs\rescue\node_modules\ajv\lib\keyword.js:65:13)
at module.exports (C:\Apache24\htdocs\rescue\node_modules\ajv-errors\index.js:10:7)
at Object. (C:\Apache24\htdocs\rescue\node_moduleswebpack\node_modules\schema-utils\src\validateOptions.js:22:1)
at Module._compile (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object. (C:\Apache24\htdocs\rescue\node_moduleswebpack\node_modules\schema-utils\src\index.js:7:25)
at Module._compile (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object. (C:\Apache24\htdocs\rescue\node_moduleswebpack\lib\SourceMapDevToolPlugin.js:13:25)
at Module._compile (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object. (C:\Apache24\htdocs\rescue\node_moduleswebpack\lib\WebpackOptionsApply.js:16:32)
at Module._compile (C:\Apache24\htdocs\rescue\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development 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\User\AppData\Roaming\npm-cache_logs\2019-02-10T00_03_30_022Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ 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\User\AppData\Roaming\npm-cache_logs\2019-02-10T00_03_30_102Z-debug.log
`

Steps To Reproduce:

stale

Most helpful comment

I have the same problem.
A temporary fix for me was:

npm install [email protected] --save-dev

Then you can run npm run dev

All 5 comments

Was looking for exactly the same error for last hour in issues.

  • Laravel Mix Version: 4.0.7 and 4.0.14
  • Node Version (node -v): v11.2.0
  • NPM Version (npm -v): 6.4.1
  • OS: Ubuntu

P.S. If you need to solve an issue temporarily: npm i laravel-mix@3 worked for me.

same problem here, thanks for the temp fix radarsu. Worked for me.

I have the same problem.
A temporary fix for me was:

npm install [email protected] --save-dev

Then you can run npm run dev

Thanks a lot guys!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mstralka picture mstralka  路  3Comments

wendt88 picture wendt88  路  3Comments

dtheb picture dtheb  路  3Comments

Bomavi picture Bomavi  路  3Comments

RomainGoncalves picture RomainGoncalves  路  3Comments