create-react-kotlin-app | Create React apps using Kotlin with no build configuration | Frontend Framework library
kandi X-RAY | create-react-kotlin-app Summary
kandi X-RAY | create-react-kotlin-app Summary
Create a new project:. (npx comes with npm 5.2+ and higher. See Installation for older npm versions.). Then open to see your app. When you’re ready to deploy to production, create a minified bundle with npm run build. Create React Kotlin App will configure Kotlin, webpack, and IntelliJ IDEA so that you can focus on the code instead. Just create a project, and you’re good to go.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Install react - packages .
- Convert options object to CommandLine options .
- Create a new app .
- Get package name from the package . json
- Install the given Yarn package .
- Install all packages
- Check an app name
- Run the compiler
- Returns the package . json file path if it exists
- Lookup the git meta .
create-react-kotlin-app Key Features
create-react-kotlin-app Examples and Code Snippets
Community Discussions
Trending Discussions on create-react-kotlin-app
QUESTION
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:
npm install -g create-react-kotlin-app
create-react-kotlin-app my-app
cd my-app
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?
ANSWER
Answered 2019-Sep-24 at 15:14Issue 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)
QUESTION
I want to deploy my application on the server in production but I am struggling to do so.
When I use npm run build
to produce an "Optimized" version of the app and launch it with serve
, it doesn't seem to use the proxy.
Going back to the dev server with npm start, I get this error:
TypeError: Kotlin.defineModule is not a function
I cannot get out of this. Has someone got a similar configuration? How did you make it work in production? Do you use something to proxy the requests to your backend?
App configurationFrontend:
Web app using create-react-kotlin-app in kotlin, react. It's on localhost:3000
(dev-server) and has a proxy to localhost:3001
(the backend).
Backend
Backend, which is a simple express router for auth and data managment from the database.
Thanks in advance
...ANSWER
Answered 2018-Mar-27 at 18:46I'll go back and answer my question,
One is a bug on their side: https://youtrack.jetbrains.com/issue/CRKA-66
I'm using a config that maybe is not ideal:
I copy the build folder that contains the optimized folder into the backend and I serve the main view "index.html" as an entry point using sendFile().
I then use the url and args to route the user into various react components pages, maybe in the future it's best to switch to: https://github.com/JetBrains/kotlin-wrappers/tree/master/kotlin-react-router-dom
QUESTION
I've created a simple react app using create-react-kotlin-app
. After successful npm start
, I tried to get a build of the project using IntelliJ IDEA
's Build -> Build Project
, but it fails stating
Error:(16, 44) Kotlin: Can't access property 'reactLogo' marked with @JsModule annotation from non-modular project
What am I missing here ?
NOTE: I haven't done any modification in the template comes with create-react-kotlin-app
. The project runs successfully, problem only exist when I try to get a build.
ANSWER
Answered 2019-May-13 at 06:38I got managed to fix this issue via terminal
.
From the project root, run
QUESTION
I have been looking forward on how to create a kotlin-react-app using gradle (I am aware with the create-kotlin-react-app CLI tool, which doesn't use radle) and i couldn't get any sources to point me through. I have stumbled accross the kotlin frontend plugin (It works) and the npm and webpack plugin, but I couldnt configure them to run/create me a kotlin-react-project. I not an expert in configuring webpack so it probably even harder for me.
Initial IntentionsI intend to create a multiplatform project (yes, the kotlin experiental packed up in IntelliJ)
Alternative Approachwhen I failed, I choose to go with this approach.
- Write my code using kotlin multiplatform plugin
- Compile it into a jar
- Add it as a library into the create-react-kotlin-app i'd create
- Run and wait for the magic to happen (it ddnt) Turns out, some how the preconfigured webpack wasn't compiling because it wasn't available during compile time. but the IDE worked well and even provided code compleion
Can someone please point me in a direction?
...ANSWER
Answered 2018-Aug-28 at 12:59Building a react app using gradle is easy when using the kotlin frontend plugin. In IntelliJ,follow these steps
New module > gradle > kotlin (Javascript) > [next,next,next...finish]
You'll have to configure gradle ofcourse (based how you like it).
I configured mine as shown below:-
QUESTION
I am developing a web app using Kotin for JavaScript and the create-react-kotlin-app CLI. When I pushed my code yesterday everything worked fine. But when I started it up again today I am getting this error:
...ANSWER
Answered 2018-Apr-12 at 15:16I ended up finding the answer here https://github.com/JetBrains/create-react-kotlin-app#npm-start-or-yarn-start
Which said to delete the .cache
folder in node_modules
. I had to do one more step though which was to clear my browser cache.
Even though I was using Chrome with dev tools open and the "don't use cache" option checked, I still had to manually clear the cache.
QUESTION
What is a easiest way / tools / technologies to get hotswap ability, while coding HTML (kotlinx-html-builder) and pure javascript (kotlin-to-js) using kotlin & gradle & IDEA ?
Not very desirable to use create-react-kotlin-app (since i'm coding pure simple js).
...ANSWER
Answered 2018-Mar-31 at 10:14There is no out-of-the-box solution currently, but one of the way to go is kotlin to js cli:
https://kotlinlang.org/docs/tutorials/command-line-library-js.html
so you can implement some file system listener and recompilation step via cli mentioned above.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install create-react-kotlin-app
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page