Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency error with SvelteKit v1.0.0-next.137 #344

Closed
nstuyvesant opened this issue Jul 24, 2021 · 10 comments
Closed

Dependency error with SvelteKit v1.0.0-next.137 #344

nstuyvesant opened this issue Jul 24, 2021 · 10 comments

Comments

@nstuyvesant
Copy link

nstuyvesant commented Jul 24, 2021

Getting this error twice when I run the dev server npm run dev -- --host --open...

ENOENT: no such file or directory, open '/Users/nates/dev/shy-svelte/node_modules/sveltestrap/src/node_modules/sveltestrap/src/InlineContainer.svelte'

I am not referencing InlineContainer.svelte in any of my code but I am using Modal and Offcanvas which both reference it.

Using sveltestrap@5.5.0, SvelteKit 1.0.0-next.137, Svelte 3.40.2, vite 2.4.3, node 16.5.0

Got the same error creating a pristine project putting Offcanvas in the boilerplate index.svelte...

  • `npm init svelte@next my-app' (setup the demo app with TypeScript, eslint and prettier)
  • cd my-app
  • npm install --saveDev sveltestrap
  • Added code to /src/routes/index.svelte script tag...
import { Offcanvas } from 'sveltestrap/src'
let isOpen = true
const toggle = () => {
    isOpen = !isOpen
  }

Added this to the section tag...

<Offcanvas {isOpen} {toggle} placement="end" header="This is a test">
Test
</Offcanvas>
@bestguy
Copy link
Owner

bestguy commented Jul 24, 2021

Hmm weird, let me see what's up

@nstuyvesant
Copy link
Author

Thanks - just updated my initial report with more details.

@bestguy
Copy link
Owner

bestguy commented Jul 24, 2021

Hi @nstuyvesant, can you try this prerelease?

npm install sveltestrap@5.5.1-1

Am assuming should fix but please confirm and I can do a real release.

@bestguy
Copy link
Owner

bestguy commented Jul 24, 2021

Actually disregard - trying this locally and still seeing:

/.../my-app-test/node_modules/sveltestrap/src/node_modules/sveltestrap/src/InlineContainer.svelte

What's up with this node_modules/sveltestrap/src/node_modules stuff?

@bestguy
Copy link
Owner

bestguy commented Jul 24, 2021

Hey @nstuyvesant , I think I found the issue - Sveltekit freaks out because InlineContainer.svelte has no <script></script> tag in it. This is not an issue with other tools so am assuming that's an error?

I have this PR which works around though: #345
Works fine for me locally but please try npm install sveltestrap@5.5.1-3 to confirm.

@nstuyvesant
Copy link
Author

Thanks for this help! I can confirm sveltestrap@5.5.1-3 solves this issue.

I can also add that if a Svelte component has a <script></script> tag but nothing in it, the same problem occurs.

@nstuyvesant
Copy link
Author

Actually, this issue was submitted already... sveltejs/kit#2001

@bestguy
Copy link
Owner

bestguy commented Jul 24, 2021

Cool thanks. I'll release a new version with this workaround for the time being.

@bestguy
Copy link
Owner

bestguy commented Jul 24, 2021

Released in sveltestrap@5.5.1, thanks for the heads up 👍

@bestguy bestguy closed this as completed Jul 24, 2021
@nstuyvesant
Copy link
Author

Awesome - thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants