-
Notifications
You must be signed in to change notification settings - Fork 306
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
Errors when used with SvelteKit #269
Comments
Hi, I am experiencing the same error -- |
Update -- trying to run the svelte sample that comes with the repo -- npm install faills:
Node version 19.6.0 |
Could you please provide a minimal repo for reproduction? |
Not my repo but someone else created example. Look in the console with this template project. |
here is a stackblitz using Vite+Svelte (no sveltekit), also erroring: |
It seems to work in my browser, with the CSS import statement uncommented |
Yes you are right, I closed my Stackblitz browser tab down. Re-opened the stackblitz from a brand new browser, and it now works. So latest version works with Vite+Svelte (no sveltekit). |
Experiencing the same issue in sveltekit when running with With sveltekit version: 1.3.10 |
Perhaps related to #162 |
I created a simple reproduction using the latest version of Sveltekit (1.6.0) and ByteMD (1.20.2), and I updated all packages, and pretty much copy and pasted the Svelte usage code from this repo's README. https://github.com/Doomd/reproduction-sveltekit-bytemd-broken I can successfully run the test site with I would have created a Stackblitz repo, but everytime I installed bytemd, upon reloading the code, the entire app would crash due to a memory overload. But I did test the github reproduction only five minutes ago and it causes all major browsers to spit out console errors. |
same problem as in #162 |
downgrading to 1.16 worked in my case |
I tried the "load only the source code from the node package" workaround without any luck. Is there any other idea to overcome this issue? |
function init(component, options, instance2, create_fragment2, not_equal2, props, append_styles, dirty = [-1]) {
const parent_component = current_component;
set_current_component(component);
const $$ = component.$$ = {
fragment: null,
ctx: [],
props,
update: noop,
not_equal: not_equal2,
bound: blank_object(),
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
callbacks: blank_object(),
dirty,
skip_bound: false,
root: options.target || parent_component.$$.root // <---------
};
...... seems this is because code if from bytemd/dist/index.mjs |
we had this error. we got it to work by adding optimizeDeps: {
exclude: ['bytemd']
} in our precision:
|
This issue is stale because it has been open for 60 days with no activity. |
This should not be marked as stale. It's still a issue breaks it's usage. |
I went over this issue sveltejs/svelte#6646 And this could be the cause of this issue:
if I change the import section in the package.json of the package exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
} to exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./svelte/index.js",
"require": "./dist/index.js"
},
} But in that case I have to create a fork, is there any way to use uncompiled component? |
This is still an issue; any fix planned? To be clear, @0gust1 's fix works. |
Additionally to this error, I am getting this warning:
|
This issue is stale because it has been open for 60 days with no activity. |
This issue was closed because it has been inactive for 7 days since being marked as stale. |
Hello, when i updated to the latest version of everything in my Sveltekit app, I started to get this error on every page with the markdown on it. Both the Viewer and Editor. Any idea what this is or how it can be solved?
The text was updated successfully, but these errors were encountered: