I'm transitioning from working on an ubuntu remote server that I accessed through ssh, to my local windows machine and wsl2
I don't know JS at all, but what worked on the server suddenly is not working on my computer at all. I've tried all different kinds of npm commands found here, but to no avail
This is the full error I'm getting
nick@GameCube:~/Winions.gg/frontend/my-app$ npm start
> [email protected] start /home/nick/Winions.gg/frontend/my-app
> react-scripts start
/home/nick/Winions.gg/frontend/my-app/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110
_ending;
^
SyntaxError: Unexpected token ;
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/nick/Winions.gg/frontend/my-app/node_modules/eslint-webpack-plugin/dist/getESLint.js:9:5)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/nick/.npm/_logs/2022-12-11T03_44_57_094Z-debug.log
This is my package.json
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"homepage": "https://winions.gg",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.2.0",
"react": "^18.2.0",
"react-bootstrap": "^2.6.0",
"react-circular-progressbar": "^2.1.0",
"react-dom": "^18.2.0",
"react-icons": "^4.6.0",
"react-router-dom": "^6.4.3",
"react-scripts": "^5.0.1",
"web-vitals": "^2.1.4"
},
"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"
]
},
"devDependencies": {
"babel-eslint": "^10.1.0"
}
}
I just want to be able to run the react app. God help me please
CodePudding user response:
Copying from my comment so this shows up as answered in the feed:
Older versions of Node don't support public fields on classes. 12.4 is the first Node version to support that syntax, and Jest is transpiled from TypeScript to support Node 14 as of this date. This table is a good resource for finding out what newer features of EcmaScript are supported in which versions of Node.