Closed hauselin closed 2 years ago
Hey thanks for creating the issue. Can you show example of how exactly are you using it?
I'm getting this error simply by importing the component in the demo/starter Svelte app.
npx degit sveltejs/template my-svelte-project
cd my-svelte-project
npm install --save svelte-inview
Changed the default App.svelte
script tag to the following:
<script>
import { inview } from 'svelte-inview';
export let name;
</script>
Then npm run dev
and I get the error.
bundles src/main.js → public/build/bundle.js...
[!] Error: Could not resolve './inview' from node_modules/svelte-inview/src/index.ts
Not sure if it's related to npm/node versions. But here they are:
➜ my-svelte-project npm --version
7.6.3
➜ my-svelte-project node -v
v15.11.0
Thanks for your help! Really appreciate it.
Oddly enough, if I clone your repository and run the demo, it works.
git clone https://github.com/maciekgrzybek/svelte-inview.git
cd svelte-inview/demo
npm install
npm run dev # app runs!
But if I delete your package-lock.json
first, then your demo breaks.
git clone https://github.com/maciekgrzybek/svelte-inview.git
cd svelte-inview/demo
rm package-lock.json
npm install
npm run dev # app breaks!
I'll take a look hopefully this weekend :)
Perfect. Thanks!
Hey @hauselin if you use the newest version it should work just fine 😊
Great! It works now. Thanks for the amazing work!
Hi, I'm trying to use this component but have been getting the error below. I've tried reinstalling (deleted
node_modules
andpackage-lock.json
) and also triednpm install --legacy-peer-deps
. They didn't fix the problem.Appreciate any help anyone can provide! Thanks!
Here's my
package.json
:rollup.config.js