Я создал приложение реагирования с помощью приложения myp, созданного с помощью npx.
Запуск npm не запускает сервер разработчика.
Я уже пытался переустановить node_modules, но это не сработало.
Я использую новейшие версии React и Node Package Manager.
Ошибка:
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 should be one of these:
RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? } | [RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
-> One or multiple rule conditions
Details:
* configuration.module.rules[1].include should be an instance of RegExp
* configuration.module.rules[1].include: The provided value "E:\\!!Netbeans\\!React js tutorial\\my-app\\src" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
* configuration.module.rules[1].include should be an instance of function
* configuration.module.rules[1].include should be an array:
[RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
* configuration.module.rules[1].include should be an object.
* configuration.module.rules[1].include should be an array:
[RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
* configuration.module.rules[2].oneOf[1].include should be an instance of RegExp
* configuration.module.rules[2].oneOf[1].include: The provided value "E:\\!!Netbeans\\!React js tutorial\\my-app\\src" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
* configuration.module.rules[2].oneOf[1].include should be an instance of function
* configuration.module.rules[2].oneOf[1].include should be an array:
[RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
* configuration.module.rules[2].oneOf[1].include should be an object.
* configuration.module.rules[2].oneOf[1].include should be an array:
[RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@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\Сергей\AppData\Roaming\npm-cache\_logs\2019-06-04T14_34_52_240Z-debug.log
Я попытался переустановить node_modules, но это не сработало. Пожалуйста, помогите мне!
Файл Package.json:
{
"name": "myapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}