mitesh bhanushali
mitesh bhanushali

Reputation: 87

React : Not able to deploy my project on github

I am new to React and whenever I try to deploy the application I am getting the following error

npm WARN [email protected] requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

This is my package.json file for the reference. Please review this and help me with the solution. I have just removed my actual username form the homepage.

{
  "name": "e-store",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://username.github.com/e-store.git",
  "dependencies": {
  "@testing-library/jest-dom": "^4.2.4",
  "@testing-library/react": "^9.5.0",
  "@testing-library/user-event": "^7.2.1",
   "react": "^16.13.1",
   "react-dom": "^16.13.1",
   "react-scripts": "3.4.1",
   "save-dev": "0.0.1-security"
  },
  "scripts": {
  "start": "react-scripts start",
  "build": "react-scripts build",
  "test": "react-scripts test",
  "eject": "react-scripts eject",
  "predploy": "npm run build",
  "deploy": "gh-pages -d build"
 },
 "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": {
  "gh-pages": "^2.2.0",
  "typescript": "^3.9.2"
 } 
}

Upvotes: 0

Views: 81

Answers (1)

Bassem
Bassem

Reputation: 4030

run the following command and this should be fixed.

npm install typescript --save-dev

Update: make sure you include the following script in your package.json

"scripts": {
  "predeploy": "npm run build",
  ... //other scripts
}

Upvotes: 1

Related Questions