Fails to import monaco editor #1201
-
Hello! Attempting to
Monaco does appear to re-assign exports.default:
But removing the first line shown above does not help. Any ideas on how to get monaco-editor to import? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 3 replies
-
Thanks for finding, that appears to be a bug in our newly-released "auto CJS named export" detection. Just quick-fixed in 1df4e16, we'll push a small release out soon with this fix. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the fix to that, but now I created a fresh project using:
I did
Then when I ran it, I got:
in the browser that popped up. |
Beta Was this translation helpful? Give feedback.
-
This is truly bizarre... Here's the code that fails with the error:
Fails:
Works:
Note that the only changes was Thanks! |
Beta Was this translation helpful? Give feedback.
-
Oh interesting. I wonder if the |
Beta Was this translation helpful? Give feedback.
-
Aha, yes, that's the reason. It is pretty bizarre code, I'll admit and I can work around it. But, get this, if you change the Thanks for your work on this! |
Beta Was this translation helpful? Give feedback.
-
notelet3.zip Unzip the above to a new folder. Run |
Beta Was this translation helpful? Give feedback.
-
i have same error . Uncaught TypeError: Failed to resolve module specifier "immer". Relative references must start with either "/", "./", or "../". but i can't fix that. please help me. I run with "npm run build" and i got that error. i need to run with "npm run build" thank you |
Beta Was this translation helpful? Give feedback.
Oh interesting. I wonder if the
"return import('https://cdn.skypack.dev/' + pkg)"
is being picked up incorrectly by any part of our import resolver. It shouldn't be, but that does look suspicious.