-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
import { navigate }
internal assertion failed
#91
Comments
Is this happening on a speical CI env or locally on your machine? Something's weird with your CI env, see module.exports = require('../../dist/cjs/client/router/index.node.js') So it should load Does your env change the
Thanks :-) |
node v14.16.1 Here's what I think is a trivial reproduction, tho the stack trace is weird on code sandbox: https://codesandbox.io/s/red-bash-2mob5?file=/src/index.ts As far as I can tell this will occur when using babel to transpile/execute |
So your goal is to unit test a component? Do you want to then also test the I'll have a look at why Babel transpiles erroneously. |
You got it! Not planning to test |
Then simply removing the Let me first have a look at how Babel transpiles, to see if it's a bug on Note that for testing |
Sounds good. Yeah, that would be more of an end to end test, I'm more trying to check the component renders properly with various props. |
Let me know if you still encouter problems. Btw. I'm curious: how has Vite been working out for you so far? |
@brillout thanks much, latest version works great to me. Vite's been working out well, it's just other tools that need to catch up! |
If you don't mind me asking: what tools have been difficult to use with Vite? Other than Jest. |
Storybook comes to mind: https://storybook.js.org Everything is very "experimental" "early stages" etc. https://github.com/eirslett/storybook-builder-vite Deno comes to mind as well... vitejs/vite#109 |
I see, thanks. |
The lead seems quite pushy about supporting Vite storybookjs/storybook#14024. Probably only a question of time. As for Deno, it's more a Deno problem if you ask me. Deno is just too much of a drastic change for the ecosystem willing to migrate. The only real benefit of Deno is the ability the run scripts with lesser permissions, which so far hasn't been a USP enough to justify migration cost. Hopefully things will change, I like Deno. Let me know if you have further integration problems. |
(I care a lot about smooth integrations.) |
(congrats on the 0.1.0 release!)
Happy to put together a sandbox/repro, just let me know.
Code like this is failing for me, not within vite itself, but within my test suite (
jest
):import { navigate } from 'vite-plugin-ssr/client/router';
It seems like
vite-plugin-ssr/client/router
could either resolve toindex.js
orindex.ts
, and certain environments will prefer theindex.js
, which trips this internal assertion.The text was updated successfully, but these errors were encountered: