Description
I write create-react-app myapp, after all installations I write npm start, and an error appears. Why?
{Failed to compile.
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module.rules[2].oneOf[1].include: The provided value "D:\!BisnesHelper\bisness\src" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bisness@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bisness@0.1.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! C:\Users\Lenovo\AppData\Roaming\npm-cache_logs\2020-08-04T11_10_57_995Z-debug.log
PS D:!BisnesHelper\bisness> npm start
bisness@0.1.0 start D:!BisnesHelper\bisness
react-scripts start
Failed to compile.
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module.rules[2].oneOf[1].include: The provided value "D:\!BisnesHelper\bisness\src" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bisness@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bisness@0.1.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! C:\Users\Lenovo\AppData\Roaming\npm-cache_logs\2020-08-04T11_15_23_920Z-debug.log}
Activity
ayush0x00 commentedon Aug 4, 2020
I got the issue resolved by replacing loaders keyword with rules.
See here for detailed and alternate solutions.
SergeOlabin commentedon Sep 5, 2020
try removing "!" in the folder name.. i usually do the same - put "!' so that it would be sorted to the top, in this case webpack has reservation for that symbol ...
YasielCabrera commentedon Oct 4, 2020
The same happened to me. Apparently the error is caused when some directory in the project path has the symbol "!" in its name. Removing the symbol solves the problem.
In your case, the !BisnesHelper directory is the cause of the problem
stale commentedon Dec 25, 2020
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
iansu commentedon Jun 2, 2021
I don't think there's much we can do about this one. Just avoid directory names that start with
!
.