New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
throw new Error('invalid "instanceof" keyword value ' + c); #1355
Comments
why do bad things happen to good people? we manually hacked our package.json to use webpack 4.2.0 and this error goes away! woo! |
I solved by lowerring my webpack-dev-server version,The problem is there |
@DCbryant which version do you use now? |
@ndabAP 2.9.1 |
I had a similar issue but it was due to not having webpack-cli installed locally. |
Had this issue today, and went away, after upgrading webpack to 4.5.0 and also installing webpack-cli locally.. |
|
So this happened because webpack pushed breaking changes in a minor version and most people probably have their I think it's extremely irresponsible for webpack to have made these breaking changes in a minor version. The webpack CLI separation should have only occurred in a major release. You have literally millions of people depending on this package, please put some more thought into release numbers. |
I have this error in a lerna project when I try to install in two different package it then fail to find the module webpack-cli: $ ./node_modules/.bin/webpack-dev-server --progress --color --hot --watch --mode development
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
module.js:559
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (module.js:557:15)
at Function.Module._load (module.js:484:25)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
error An unexpected error occurred: "Command failed. so I moved it to the top package.json, and then I have this error: yarn run v1.5.1
$ ./node_modules/.bin/webpack-dev-server --progress --color --hot --watch --mode development
/home/dka/workspace/github.com/yeutech/react-admin/node_modules/webpack/node_modules/ajv-keywords/keywords/instanceof.js:52
throw new Error('invalid "instanceof" keyword value ' + c);
^
Error: invalid "instanceof" keyword value Promise
at getConstructor (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/webpack/node_modules/ajv-keywords/keywords/instanceof.js:52:11)
at Ajv.compile (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/webpack/node_modules/ajv-keywords/keywords/instanceof.js:21:27)
at Object.useCustomRule (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/compile/index.js:275:26)
at Object.generate_custom [as code] (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/dotjs/custom.js:32:24)
at Object.generate_validate [as validate] (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/dotjs/validate.js:347:35)
at Object.generate_anyOf [as code] (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/dotjs/anyOf.js:34:27)
at generate_validate (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/dotjs/validate.js:347:35)
at localCompile (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/compile/index.js:87:22)
at Ajv.compile (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/compile/index.js:56:13)
at Ajv._compile (/home/dka/workspace/github.com/yeutech/react-admin/node_modules/ajv/lib/ajv.js:358:27)
error An unexpected error occurred: "Command failed.
Exit code: 1 I have tried to downgrade webpack from 4.5.0 to 4.2.0 as @silky recommend but that doesn't help. Any idea on how to solve this? |
maybe you can change your package.json |
@kopax, I was able to solve this by updating lerna to |
It looks like this issue is related to webpack and/or webpack-cli, not webpack-dev-server, so I'm closing this. If you believe this is an issue in WDS please provide a test repository, because I cannot reproduce this. |
remember to lower your webpack-dev-server globaly not localy use : |
|
I read this topic for a second time within 2 weeks so I decided to write down my own suggestions in case I will come back anytime in the future;) The below is a complete list of dependencies I had to upgrade to upgrade from vulnerable react-dom@16.0.0 to @16.0.1:
remove |
you can use npm run build instead of |
following worked for me |
Thank you, this is actually worked.. |
Getting this error while running
webpack-dev-server --config ./webpack.client.js --hot
Full stacktrace
The text was updated successfully, but these errors were encountered: