Error getting while building react kotlin app using IntelliJ - reactjs

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.

I got managed to fix this issue via terminal.
From the project root, run
react-scripts-kotlin build
This will automatically creates a build folder with production ready files.

Related

An unhandled exception occurred while processing the request. ASPNETcore and React

I made a new project in asp.netcore version 3.1 and react in visual studio. I get the following when I run the project:
I tried to delete node_modules and ran npm install, but it did not work. I have also tried to clone my friends github repo (which works on his computer) to mine computer to check if it is possible to run, but it does not work. Hoping for an answer as soon as possible.
I have done several projects in aspnet core and jquery. But it does not work to run a project in react, why do I get this error?

Meteor throwing unusual errors in browser console

I am working on meteor reactjs project. Previously it was running fine, but suddenly I am started to getting this error.
Pic shown above are the errors I am getting in browser. I cannot load my project in browser even though I can't see any error on meteor run command prompt.
Can anyone help me with this?
I solved this issue.
The project repository is using meteor version 1.8.1.
And my laptop .meteor.bat file was pointing to 1.12.0 meteor version.
I changed meteor version 1.12.0 to 1.8.1 in .bat file from AppData folder of C folder.
Then npm install and restart meteor project.
This removed all exceptions from browser console and my web page started working

Getting Error while Building Electron Application

I have created an UI using ReactJS and embedded the electron into that. I can run my React UI as a Desktop App using electron.
Now, I am facing an issue creating builder using electron-packager.
Below is the error: rcedit.exe failed with exit code 1. Fatal error: Unable to commit changes
However, I can see the created package in the "Temp" folder under "electron-package" folder still it throws the above error. Also, I have tried running executable from the Temp folder, it opens desktop app (still there are few errors but they are related to code - I am not worry about this errors).
ElectronJS - https://www.electronjs.org/
It would be great if someone help me on this.
Thanks in advance.
By degrading Electron version from latest to v10.1.6, it got resolved.

Drill Down by code in PowerBI-JavaScript source code github throwing error

After download the source code from Github as suggested in this community forum, run the application with ng serve -o and also run the commands
npm install --save-dev #angular/cli#latest but it throws the error like-
Local workspace file ('angular.json') could not be found. Error: Local
workspace file ('angular.json') could not be found. at
WorkspaceLoader._getProjectWorkspaceFilePath
(RND\PowerBI-JavaScript-master\PowerBI-JavaScript-master\demo\node_modules\#angular\cli\models\workspace-loader.js:37:19)
So, can anyone help me how to run this application
It seems you're trying to use the library for Power BI Embedding and are mistaking it for an angular component library of some sort.
Angular CLI is a library that helps when writing Angular applications, which in this case would probably require you to run ng init to create the angular.json and only then running ng serve.
Again, not sure what you're trying to do with regards to the linked library (PowerBI-Javascript)

How can I use Angular 2 with NetBeans?

I have tried every tutorial I could find to try to make a HTML/JS project with Angular 2 working on NetBeans, but none have worked. Maybe is my npm that is bugged (search, for example, doesn't work).
The node_modules folder that is created with npm install is grey on NetBeans and have some errors in some files (I don't know if this is normal). Any .js I try to import from node_modules folder gives the error Failed to load resource: net::ERR_EMPTY_RESPONSE / Uncaught ReferenceError: System is not defined.
Does anyone have any idea what could I be doing wrong? Or does anyone knows any tutorial that have the code to download so I can compare with what I'm doing and see what is the correct? Every tutorial I have found doesn't have any code to download, just some pieces of codes in the page for explanation.
Sory if this isn't a good question, but I have been trying to make this work since yesterday without success and I'm completely out of idea.
First I recommend to upgrade to the last version of NodeJS and NPM, to minimize the errors in your node_modules folder
Install the Everlaw's Typescript plugin from https://github.com/Everlaw/nbts/releases . If you are using Netbeans 8.1 I think you can install it directly from the Plugins installer. I'm using NetBeans 8.2 and there is no problems installing the plugin manually.
Then on NetBeans go to Tools -> Options -> HTML/JS -> Node.js and write the right Node and NPM Paths and Sources, I would recommend check-on the three check-boxes in that panel.
For a quick start try the QuickStart demo from the angular.io page, it is not necessary make any change in the package.json.
The first time I tried to debug an Angular 2 application I put the index.html file directly in the project folder in order to do not make any changes in the index.html script sources nor change the project files structure but you need to change some properties of the project:
In the project window right click the project and select properties.
In sources change the Site Root Folder using the Browse button and select the project folder (You can ignore the warning that appears).
In Run select Run As: Web Application.
I recommend select Browser: Chrome with NetBeans Connector
Using the Browse button go to the project folder and select index.html as your Start File.
Select Web Server: Embedded Lightweight.
And finally in Web Root write /Your_Project_Folder
run npm install from NetBeans
Click the run button and your web application must open in chrome, if you edit your html or typescript files and save them you could see the changes in the browser in real time without re-debuggind your application and can use the Browser DOM window to explore your elements created from Angular 2.
You still see some errors in your files because NetBeans is not fully compatible with the HTML Angularized syntax. But it runs flawlessly.
You can also run the start script directly from Netbeans to run your project using lite-Server.
Screenshot NetBeans - Angular 2
I would recommend you to install the angular cli: npm install -g angular-cli#webpack
Fore more infos regarding this tool, take a look here: https://cli.angular.io/
Then create a new Angular2 app with ng new <app-name>
This will create a complete and working Angular2 application in the current folder.
cd <app-name> and start the app with ng serve.
Check your new created app in your browser on localhost:4200.
If this works, you can try to get started with your NetBeans! :)

Resources