-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
TypeError with App router using excalidraw #7513
Comments
me too const Excalidraw = dynamic(
async () => (await import("@excalidraw/excalidraw")).Excalidraw,
{
ssr: false,
}
); next: 14.0.5-canary.68 |
Have you also added |
I can confirm the error, I have the same, even with "use client", and does the same when I don't import it dynamically. PS : The error appears to me only if I use turbo. |
Any news on this? It looks like it doesn't work with turbo, but works with usual Webpack because the library for some reason tries to use css-loader. Here's a call stack:
I use Excalidraw 0.17.3. with Next 14.1.4 and app router. Additional info: basing on a NextJS sample you've provided I just had to remove line |
I get a similar error with
Figured it could be solved by adding experimental: {
turbo: {
rules: {
'*.scss': {
loaders: ['style-loader', 'css-loader', 'sass-loader'],
as: '*.js',
},
},
},
} |
Should be fixed with this PR and be part of an upcoming release. |
I have confirmed this did not fix the issue for me, it only works if turbo is not enabled. Next version: 14.2.11 |
@lagupa The fix is not in the stable versions of excalidraw. You can try and pick an unstable version from https://www.npmjs.com/package/@excalidraw/excalidraw?activeTab=versions. For example: "dependencies": {
"@excalidraw/excalidraw": "0.17.1-c1b310c",
} |
Yes! @clement2026's idea worked for me! (ctx) Also after doing this, I now get the following downloadable font errors: |
@andrewgosselin I’m glad to hear you found it helpful!
Yeah, looks like it. I also noticed the .woff2 errors in my NextJS project, but since they don’t affect anything, I’m fine with it. |
Hi, I tried theses versions and I getting this error ERROR in ./node_modules/@excalidraw/excalidraw/dist/dev/index.js 1576:0-42
Module not found: Error: Can't resolve 'roughjs/bin/math' in '<my_path_app>/node_modules/@excalidraw/excalidraw/dist/dev'
Did you mean 'math.js'?
BREAKING CHANGE: The request 'roughjs/bin/math' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified. Maybe the Package should build for cjs and esm, or change to type module in package.json, or If you know the solution, I appreciate (sorry my english its very bad) |
I copied the code above, the app router gives me this error, how to solve this issue?
TypeError: _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default(...) is not a function
The text was updated successfully, but these errors were encountered: