1
votes

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?

1
Maybe run npm install between 2 and 3 Step 2 should be npx create-react-kotlin-app my-app - HMR
@HMR, do i need to do 'cd my-app' before that? - Amin Memariani
Yes, you can also create an app with create-react-app my-app --scripts-version react-scripts-kotlin according to ]the documentation](github.com/JetBrains/create-react-kotlin-app). The docs say that npm install is not needed (maybe start will take care of that). - HMR
no luck even with 'create-react-app my-app --scripts-version react-scripts-kotlin' - Amin Memariani

1 Answers

0
votes

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)