0

I am trying to install a git repo into a project so that I can import the components. I cannot use npm to package the components because we do not have a private npm registry.

when I try to install I get "Support for the experimental syntax 'jsx' isn't currently enabled". I have tried all the solutions here :Support for the experimental syntax 'classProperties' isn't currently enabled but they have not worked. Here is my .babelrc :


{
    "presets": [
        "@babel/preset-env",
        "@babel/preset-react"
    ],
    "plugins": [
        [
          "@babel/plugin-proposal-class-properties"
        ]
    ]
  }

And package.json:

  "name": "i-react",
  "version": "1.0.0",
  "main": "build/index.js",
  "repository": "ssh://......,
  "author": "",
  "license": "MIT",
  "scripts": {
    "build": "babel src -d build",
    "prepare": "yarn run build"
  },
  "devDependencies": {
    "@babel/cli": "^7.10.5",
    "@babel/core": "^7.11.4",
    "@babel/plugin-proposal-class-properties": "^7.10.4",
    "@babel/plugin-syntax-jsx": "^7.10.4",
    "@babel/preset-env": "^7.11.0",
    "@babel/preset-react": "^7.10.4"
  },
  "dependencies": {
    "react": "^16.13.1"
  }
}
RobC
  • 16,905
  • 14
  • 51
  • 62
TEbogo
  • 119
  • 2
  • 9
  • duplicated? https://stackoverflow.com/questions/23210437/npm-install-private-github-repositories-by-dependency-in-package-json – Sheldon Oliveira Aug 27 '20 at 16:27
  • @SheldonOliveira, No I pasted a link to the error similar to the one I got. I installed the repo just fine earlier but now I get that error. – TEbogo Aug 27 '20 at 17:19

0 Answers0