1

I am trying to run create-react-kotlin-app module using npm but it gives me this error:

Failed to compile

multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/react-scripts-kotlin/config/polyfills.js kotlinApp Module not found: Syntax/Users/amin/package.json (directory description file): SyntaxError: /Users/amin/package.json (directory description file): SyntaxError: Unexpected end of JSON input

This error occurred during the build time and cannot be dismissed.

Although I have just followed these instructions:

  1. npm install -g create-react-kotlin-app
  2. create-react-kotlin-app my-app
  3. cd my-app
  4. npm start

Note: I could successfully run create-react-app module with no errors. My JDK is also 1.8.111 in case it matters. Does anyone know why do I get such an error and how to fix it?

Amin Memariani
  • 830
  • 3
  • 17
  • 39
  • Maybe run `npm install` between 2 and 3 Step 2 should be `npx create-react-kotlin-app my-app` – HMR Aug 19 '19 at 14:10
  • @HMR, do i need to do 'cd my-app' before that? – Amin Memariani Aug 19 '19 at 14:16
  • Yes, you can also create an app with `create-react-app my-app --scripts-version react-scripts-kotlin` according to ]the documentation](https://github.com/JetBrains/create-react-kotlin-app). The docs say that npm install is not needed (maybe start will take care of that). – HMR Aug 19 '19 at 14:18
  • no luck even with 'create-react-app my-app --scripts-version react-scripts-kotlin' – Amin Memariani Aug 19 '19 at 14:30

1 Answers1

0

Issue resolved after uninstalling Node from my MacBook and installing it again. follow these steps to uninstall Node completely: How to uninstall Node from MacOS Then I installed Node again using brew install node (Don't forget brew update before that)

Amin Memariani
  • 830
  • 3
  • 17
  • 39