maciekgrzybek / svelte-inview

A Svelte action that monitors an element enters or leaves the viewport.🔥
MIT License
749 stars 23 forks source link

Netlify Deploy Issue v4 #39

Closed hmajid2301 closed 1 year ago

hmajid2301 commented 1 year ago

Hi me again,

I'm having some issues deploying my app to Netlify. I get the following error:

pnpm run build

[vite-plugin-pwa:build] Failed to resolve entry for package "svelte-inview". The package may have incorrect main/module/exports specified in its package.json.
10:51:07 PM: error during build:
10:51:07 PM: Error: Failed to resolve entry for package "svelte-inview". The package may have incorrect main/module/exports specified in its package.json.
10:51:07 PM:     at packageEntryFailure (file:///opt/build/repo/node_modules/.pnpm/vite@4.1.1_@types+node@18.11.18/node_modules/vite/dist/node/chunks/dep-3007b26d.js:22004:11)
10:51:07 PM:     at resolvePackageEntry (file:///opt/build/repo/node_modules/.pnpm/vite@4.1.1_@types+node@18.11.18/node_modules/vite/dist/node/chunks/dep-3007b26d.js:22001:5)
10:51:07 PM:     at tryNodeResolve (file:///opt/build/repo/node_modules/.pnpm/vite@4.1.1_@types+node@18.11.18/node_modules/vite/dist/node/chunks/dep-3007b26d.js:21736:20)
10:51:07 PM:     at Object.resolveId (file:///opt/build/repo/node_modules/.pnpm/vite@4.1.1_@types+node@18.11.18/node_modules/vite/dist/node/chunks/dep-3007b26d.js:21487:28)
10:51:07 PM:     at Object.handler (file:///opt/build/repo/node_modules/.pnpm/vite@4.1.1_@types+node@18.11.18/node_modules/vite/dist/node/chunks/dep-3007b26d.js:44852:19)
10:51:07 PM:     at file:///opt/build/repo/node_modules/.pnpm/rollup@3.12.1/node_modules/rollup/dist/es/shared/rollup.js:23785:40
10:51:07 PM:     at async PluginDriver.hookFirstAndGetPlugin (file:///opt/build/repo/node_modules/.pnpm/rollup@3.12.1/node_modules/rollup/dist/es/shared/rollup.js:23685:28)
10:51:07 PM:     at async resolveId (file:///opt/build/repo/node_modules/.pnpm/rollup@3.12.1/node_modules/rollup/dist/es/shared/rollup.js:22629:26)
10:51:07 PM:     at async ModuleLoader.resolveId (file:///opt/build/repo/node_modules/.pnpm/rollup@3.12.1/node_modules/rollup/dist/es/shared/rollup.js:22893:15)
10:51:07 PM:     at async Object.resolveId (file:///opt/build/repo/node_modules/.pnpm/vite@4.1.1_@types+node@18.11.18/node_modules/vite/dist/node/chunks/dep-3007b26d.js:7972:10)
10:51:07 PM:  ELIFECYCLE  Command failed with exit code 1. (https://ntl.fyi/exit-code-1)

I cannot tell if this is an issue with this library or something else. Mind you it seems to build locally. So I don't know if this is an issue with Netlify or if its using slightly different env variables to what I expect.

Thanks

Related MR: https://gitlab.com/bookmarkey/gui/-/merge_requests/125

maciekgrzybek commented 1 year ago

I'm assuming it's because you tried to use the version from GH branch :) I've just released v4.0.0 to npm so you can just install it and it should work :)

hmajid2301 commented 1 year ago

Yeh I'd think netlify could handle installing from github. Maybe I'm too used to golang :sweat:. But that did it thanks!