neutralinojs / neutralinojs-cli

neu cli for Neutralinojs
https://neutralino.js.org/docs/cli/neu-cli
MIT License
93 stars 56 forks source link

Build Error -- neu: ERROR Error: ENOENT: no such file or directory, stat './undefined' #158

Closed CM-IV closed 6 months ago

CM-IV commented 2 years ago

The Problem

I am running into an error when trying to build a GUI app that makes use of Preact Typescript and uses the Vitejs bundler on the frontend.

image

This error does not really tell me much, and the neutralinojs.log file does not show a relevant ERROR either.

A temp folder is generated after building that holds the resources dir and the neu.config.json file:

image

Inside of my frontend package.json, I am copying over the built files into the resources dir:

image

This is what the inside of my index.html file looks like:

image

I was able to use the neu cli to create the minimal project and build it successfully that way, which is why there is a dist directory at the top level.

The GUI is able to hot reload properly with the help of Vitejs, but I cannot figure out this one issue that prevents me from building.

CM-IV commented 2 years ago

Here are the contents of the neutralino.config.json:

Saeid-Za commented 2 years ago

Hello There ! I encountered this error today. After a bit experimenting with neutralino.config.json file, I've finally found cause this problem. This error occurs when there is no clientLibrary field in neutralino.config.json. be sure to set this field, it should be pointing to the client library's path. I'm using my own client library and don't need neutralino to add it the source code again. so, in this case, i'm just using an empty JS file.

beibeibeibei2022 commented 1 year ago

Hello! maybe neutralino.config.json problem. i lost this, neutralino.config.json > modes > window > icon. You can refer to this document 👉 neutralino.config.json from web-to-desktop-framework-comparison

shalithasuranga commented 6 months ago

This issue was fixed by https://github.com/neutralinojs/neutralinojs-cli/commit/39c925ab0593c5cf2f3b6ec6dc4c49de539ec7d1 We'll release these changes with the upcoming release :tada: