-
Notifications
You must be signed in to change notification settings - Fork 154
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
match.js:55 Uncaught TypeError: (0 , Router.exec) is not a function #347
Comments
I have noticed that while react-router distributes both es and non-es versions here: match.js is included without es version, without package.json file referencing it. Could that be a problem? |
i have the same error, i try to says this in slack but.... nobody answered me :( |
@aguilera51284 I can't find any message thread related to that for the past weeks in slack. @kulak Thank you so much for the repo. That way I can easily reproduce the described issue. I had a closer look and the error is caused by a bug in @rollup/plugin-commonjs (formely known as class Foo {
// ...
}
Foo.baz = 42
const bar = () => null;
export { Foo, bar };
export default Foo; When rollup sees someone using a commonjs import like we do in const MyFoo = require("./Foo");
// What rollup actually exports
class Foo() {...}
// What should be correct exports instead
{
default: Foo,
Foo,
bar,
} I'm afraid we can't fix that issue on our end. The rollup team is pretty amazing when it comes to fixing these things so the best chance to get this resolved is to file an issue in their tracker 👍 |
@marvinhagemeister I don't think this is a rollup issue, as |
I have tried rollupjs approach that's not path frequently taken and I used
preact-cli
generated TypeScript as a starting point. So, the issue might be caused by rollupjs.When I include
Link
I get this error:I created a demo project to replicate this error with detailed exception provided in README:
https://github.com/Kulak/preactRouterRollupExample
My tsconfig file already includes option
Does anyone have any idea?
The text was updated successfully, but these errors were encountered: