woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.01k stars 38 forks source link

No package.json on Windows #75

Closed pcharbon70-leco closed 5 months ago

pcharbon70-leco commented 10 months ago

Not a super big issue but when following the installation steps of the readme, no package.json gets generated. The easy fix was to copy and paste the one from the example_project/assets and correcting the paths.

{ "devDependencies": { "@types/lodash": "^4.14.192", "dynamic-marquee": "^2.6.2", "esbuild": "^0.16.17", "esbuild-plugin-import-glob": "^0.1.1", "esbuild-svelte": "^0.7.4", "lodash": "^4.17.21", "stylus": "^0.55.0", "svelte": "^4.1.2", "svelte-preprocess": "^5.0.4", "typescript": "^4.9.5" }, "dependencies": { "live_json": "file:../deps/live_json", "live_svelte": "file:../deps/live_svelte", "phoenix": "file:../deps/phoenix", "phoenix_html": "file:../deps/phoenix_html", "phoenix_live_view": "file:../deps/phoenix_live_view", "svelvet": "^8.1.0" } }

Thought that some other "'weirdos" working on Windows like me might find it useful.

woutdp commented 10 months ago

Thanks for reporting, I haven't tested on Windows so this is useful.

If anyone on Windows experiences the same issue please leave a comment, would be good to know this is a general issue that's happening on Windows.

user20230119 commented 10 months ago

package.json was missing for me on Windows.

voughtdq commented 9 months ago

We might need to add a minimal package.json if one doesn't exist. I think the packages might be getting installed globally when npm doesn't find a package.json. npm init --yes adds a little too much, so maybe just copying in our own would work?

tonydangblog commented 7 months ago

I had similar issue with the package.json not showing up on Mac. I made PR #96 that I think will fix the issue. Not sure if it's the same issue for Windows.

jwsinner commented 6 months ago

Another Windows machine not having package.json show up.

woutdp commented 5 months ago

Should be solved in the latest version