Until starting up my computer this morning the following worked:
npm run start
which would run my custom script in package.json
and essentially boot up electron with react.
However now running the same command does absolutely nothing. The terminal just returns.
~/myapp > npm run start
~/myapp >
I have tried the following with and without step 3 and it didn't work.
- Delete
node_modules
- Delete
package-lock.json
- Run
npm cache clean -f
- Run
npm i
- Try again.
I have uninstalled and reinstalled node.
My setup is:
~/myapp > node -v
v13.5.0
~/myapp > npm -v
6.13.4
and my package.json
is as follows:
{
"name": "...",
"version": "...",
"description": "...",
"author": "...",
"build": {
"appId": "appname.app",
"mac": {
"icon": "build/icon.png"
},
"extraResources": [
"./public/**"
]
},
"homepage": "./",
"main": "public/electron.js",
"dependencies": {
"@babel/runtime": "^7.7.7",
"@material-ui/core": "^4.8.2",
"@material-ui/icons": "^4.5.1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"array-move": "^2.2.1",
"cross-env": "^6.0.3",
"electron-context-menu": "^0.15.2",
"electron-is-dev": "^1.1.0",
"electron-window-state": "^5.0.3",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-dropzone": "^10.2.1",
"react-pdf": "^4.1.0",
"react-scripts": "3.3.0",
"react-smooth-dnd": "^0.11.1",
"typeface-roboto": "0.0.75"
},
"scripts": {
"react-start": "GENERATE_SOURCEMAP=false react-scripts start ",
"react-build": "GENERATE_SOURCEMAP=false react-scripts build",
"react-test": "GENERATE_SOURCEMAP=false react-scripts test",
"react-eject": "GENERATE_SOURCEMAP=false react-scripts eject",
"electron-build": "electron-builder",
"build": "npm run react-build && npm run electron-build",
"start": "concurrently \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electron .\""
},
"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"
]
},
"devDependencies": {
"concurrently": "^5.0.2",
"electron": "^7.1.7",
"electron-builder": "^21.2.0",
"wait-on": "^3.3.0"
}
}
Note: I had to add GENERATE_SOURCEMAP=false
to the scripts to fix a bug in a dependency.
Can anyone please help?
EDIT:
I just created a completely new project to test the problem as follows:
npm init react-app testapp
cd testapp
npm start
and the problem persists.