Fish shell
ghostdevv opened this issue · 22 comments
This doesn't seem to work for me using fish, I had to switch to bash. While this isn't a problem it would be nice to support it.
OS: Manjaro Linux
Fish: 3.2.1
Node: 12 (latest)
Node gui: Starter template
doesn't seem to work
In what way does it fail? Please provide details (e.g. CLI logs, error logs). Does it fail at build-time or run-time?
Both build time and run time, I can try and get an error log for you both later tonight
Yes please! Otherwise I've got nothing to go on.
Hey, sorry for the late response @shirakaba . Here is the output of npm run dev after following the instructions here: https://sourceb.in/Tf2EFw8sDW
This might be a problem with npm install in fish as it seems to take a shorter amount of time and prints a lot less in fish than bash, it might be that fish isn't running something or building it properly?
Update: this definitely seems like a problem with npm install as I switched to bash and typed npm install and it worked. Not sure if this problem is caused by npm or nodegui
@ghostdevv thanks for the details. It looks like bundling failed because the @nodegui/svelte-nodegui node module hadn’t been installed. So the question is why it hadn’t been installed.
What happens when you do a fresh clone of the starter template (in Fish) and follow the instructions up to and including the run npm install step? Is there an error seen during installation?
I think running npm install in fish is causing whatever the build process that should run to not run. When I run npm install in bash it's running fine
@ghostdevv I've just updated the starter template because the package-lock had a possible version mismatch with the package.json. If you could please try starting a project afresh from that, I'd be interested to know the outcome.
@ghostdevv Also, what version of Node are you using?
This is odd, I managed to sort out the version issue using a port of nvm for fish and installing worked fine however I am still getting the error, here is a fresh copy in case it's different: https://sourceb.in/KYdP9NaeoV
The same error happens when running npm run dev in bash so it might still be a install issue?
Both bash and fish are showing the same node version so I tried to do a fresh install via bash and it did not work.
I'm (successfully) using Node v14.6.0 myself, so I think we're onto something. What npm version is referenced? I'm on npm v6.14.7.
The same error happens when running
npm run devin bash so it might still be a install issue?
The error in your paste indicates that both Webpack and ts-loader are failing to resolve @nodegui/svelte-nodegui, so it would seem that node_modules/@nodegui/svelte-nodegui is missing following your npm install. Is this the case? I wonder whether the require() algorithm changed in some way since Node v14. But seems unlikely... Is node_modules/@nodegui/svelte-nodegui genuinely missing in your project?
The key thing I do know that changed since npm v6 (which was contemporary with Node v14) is how peer dependencies are handled.
If you're using npm v7 or higher, you could try npm install --legacy-peer-deps instead of npm install to keep installation consistent. Or just install using npm v6.
Could you provide full logs of what happens following a fresh npm install in fish?
I am on npm 6.14.13, here are logs from npm install in fish: https://sourceb.in/oNS5t4nR1E
I am not sure this is just fish, I just tried in only bash and it still can't find svelte-nodegui. Which is making me confused.
I tried just basic node gui and it worked fine so I think that rules out possible system requirement errors? (Works in both fish and bash)
I have a suspicion.
As far as I can see (I’m on my phone), the @nodegui/svelte-nodegui/package.json lacks a main field.
The Rollup bundle I believe is outputting to dist/index.js:
svelte-nodegui/rollup.config.js
Line 55 in 1ce01eb
Could you try manually patching that package.json to set the main field as such, then running npm run dev?
Okay after many red herrings, I've found the problem.
In (at least) the last release of Svelte NodeGUI, I clearly ran npm publish --access=public in the root directory instead of npm run deploy, so it published the repo root rather than the built repo. This is clear because the node module only contains sources and no built files.
I'll republish it this evening (or during my lunch break in the next couple of hours if I have time). I don't know which was the last working release of Svelte NodeGUI, unfortunately, but it's worth waiting for this one because the last few releases fixed some significant things.
Until I have a moment to republish the package, your best option is to try downgrading through each different version of @nodegui/svelte-nodegui until you find one that works.
The last versions are:
0.1.1 (this is the latest one, and is known to be broken)
0.1.0
0.0.4
0.0.3-alpha.1
0.0.2-alpha.2
0.0.2-alpha.1
I've republished it; should be fixed in version 0.1.2:
npm install --save "@nodegui/svelte-nodegui@0.1.2"So I can actually get something running now, webpack seems to just hang in both build and dev,
In dev mode, the Webpack process is set to "watch" mode, so it awaits changes to your files; is that what you're seeing? Does it react (i.e. live-reload) when you save a change to a .svelte file?
But as you say, if the build command hangs, then it's probably something else.
It is still not building the stuff it's supposed to in fish so had to run
npm installwith bash
As I neither use Manjaro Linux nor Fish shell, I don't have much to go on. That npm install isn't behaving correctly on Fish is out-of-scope for Svelte NodeGUI, I'm afraid – that sounds more like an issue regarding some combination of Node, npm, Fish, and Linux. If it's not much trouble, I'd recommend just continuing with bash for Svelte NodeGUI development if you possibly could!
The screenshot of the running app is disheartening. Although the elements are all there, it looks like Flexbox layout is not very happy at all. Unfortunately that's out of my expertise – it's the parent project, NodeGUI, that implemented the lower-level features like that. The fact that the app appears to be generally working otherwise makes me think this is primarily an issue of Linux support. But maybe it is something to do with the build going wrong in some way.
Hey sorry for the late reply. If it doesn't work in fish it doesn't, I could make a issue in NodeGUI but I would need to do some testing to see if it's my setup or other setups. As long as I can run it in bash that is no problem


