Reputation: 1
I create react app with create-react-app and when I use yarn start the following error happens:
Here is the package.json of the project folder:
{
"name": "letmeask",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/jest": "^26.0.15",
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"typescript": "^4.1.2",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
and here is the package.json from upath folder:
{
"name": "upath",
"description": "A proxy to `path`, replacing `\\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.",
"version": "1.2.0",
"homepage": "http://github.com/anodynos/upath/",
"author": {
"name": "Angelos Pikoulas",
"email": "[email protected]"
},
"license": "MIT",
"keywords": [
"path",
"unix",
"windows",
"extension",
"file extension",
"replace extension",
"change extension",
"trim extension",
"add extension",
"default extension"
],
"repository": {
"type": "git",
"url": "git://github.com/anodynos/upath"
},
"bugs": {
"url": "http://github.com/anodynos/upath/issues",
"email": "[email protected]"
},
"main": "./build/code/upath.js",
"types": "./upath.d.ts",
"preferGlobal": false,
"scripts": {
"test": "grunt",
"build": "grunt lib"
},
"directories": {
"doc": "./doc",
"dist": "./build"
},
"engines": {
"node": ">=4",
"yarn": "*"
},
"devDependencies": {
"chai": "~4.0.2",
"coffee-script": "1.12.6",
"grunt": "0.4.5",
"grunt-contrib-watch": "^1.1.0",
"grunt-urequire": "0.7.x",
"lodash": "^4.17.15",
"mocha": "~3.4.2",
"uberscore": "0.0.19",
"underscore.string": "^3.3.5",
"urequire": "0.7.0-beta.33",
"urequire-ab-specrunner": "^0.2.5",
"urequire-rc-inject-version": "^0.1.6"
}
}
I've tried yarn install, yarn update, npm install, npm upgrade, vscode reinstall, but nothing works.
Upvotes: 0
Views: 3849
Reputation: 489
Try deleting your yarn.lock
and run yarn install
again. Also, running npm install
when you're using yarn isn't recommended. It may cause issues if you mix two package managers in one project.
If you did run npm install
and ended up creating a package-lock.json
, please delete that as well and stick to yarn commands for this project in the future.
Upvotes: 2