I would like to try the NeutralinoJS using viteJS and litElement.
I have followed https://neutralino.js.org/docs/how-to/use-a-frontend-library
but i can't get it to work.
What i have tried:
- After initializing the neutralinojs app with
neu create myapp --template neutralinojs/neutralinojs-zero
i can cd into and runnpm run
. I get an app with the textIt works
. So i think this step is ok. - Then, like they say in the docs, i cd into the app folder. Here i initialize the vite project with
npm create vite@latest
- I follow the vite wizard install to create a lit project using typescript
- i can then cd into the lit application folder, build it and then run
npm run dev
, which open the vite example app on the browser. So i think on this step everything is working ok
At this point i can still run the neu run
command on the neutralino folder and the app (the neutralino example all with the "It works" text) still runs
Where things go wrong:
- On the neutralino-config.json i make the following changes:
- "documentRoot": "/my-lit-app/dist/"
- "icon": "/my-lit-app/dist/vite.svg"
- "resourcesPath": "/my-lit-app/dist/"
- "clientLibrary": "/my-lit-app/dist/my-lit-app.js"
- run
neu update
- build the lit app with
npm run build
inside themy-lit-app
folder - run
neu run
on the neutralino app folder
At this point i get the error: neutralino-mac_x64 quite unexpectedly
(an osx alert window) and i get on the console:
neu: INFO Starting process: neutralino-mac_x64 --load-dir-res --path=. --export-auth-info --neu-dev-extension --neu-dev-auto-reload
INFO 2022-10-09 17:06:34,433 Auth info was exported to ./.tmp/auth_info.json api/debug/debug.cpp:14 myname@unknown-host
neu: INFO neutralino-mac_x64 was stopped with success code 0
The my-lit-app entry point is the my-lit-app/index.html
.
I think what i want is the neutralino app to open and run this file, but i have no idea why it isn't working