0

I have React project, created on MacOs and i want to run it on win10, but win10 computer in corp's LAN, so i cannot use "npm install" to download all dependencies. Hence i got all of them and builded project via Git, so for now on win10 i have all files are needed to "npm start". But here are several errors, when i tried to run dev server or builded project:

  1. npm start (== "react-scripts start")
    'react-scripts' is not recognized as an internal or external command
  2. npm start (== "node node_modules/.bin/react-scripts start")
    Unexpected token '.'
    Non of additional slashes before .bin to screening not helped.
  3. npx serve -s build
    network to registry.npmjs.org/serve failed.
    Unclear why it needs internet at all, i just want to run builded project.

All of advices are to run "npm install" before "npm start", but i cannot connect to central artifactory from our LAN and i already have all of dependencies.
Hence, there are way to just start dev server or pack all project's files in some analogue of .jar totally without internet?

package.json

  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@date-io/date-fns": "^1.1.0",
    "@material-ui/core": "^4.11.0",
    "arui-feather": "^18.4.0",
    "axios": "^0.21.0",
    "core-js": "^3.7.0",
    "date-fns": "^2.0.0-beta.5",
    "material-table": "^1.69.2",
    "react": "^16.14.0",
    "react-dom": "^16.14.0",
    "react-router": "latest",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.0",
    "web-vitals": "^0.2.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"
    ]
  }
}
  • Here's a suggestion with the assumption that you just want to run this project on the windows machine (not work on it there). You could run `yarn build` on your mac, upload that somewhere and then serve the generated build on your windows machine. You could also use things such as code sandbox (unless its locked too) – ParthianShotgun Dec 04 '20 at 19:33
  • @ParthianShotgun my builded by "react-scripts build" project is not serving, see point 3. Is there reason to try by yarn? – Deus Asakura Dec 04 '20 at 19:47
  • No, no reason just typo (by habit). – ParthianShotgun Dec 04 '20 at 19:50

0 Answers0