Getting this error right after updating. Will dig deeper later today.
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
The above error occurred in the <ForwardRef> component:
at http://0.0.0.0:3000/packages/react-meteor-data.js?hash=085e11d486d61b046c1711ec1d5bf34be9d73759:397:20
If I dig into the specific part of the code throwing the error, it’s the one starting with const data:
While selecting package versions:
error: No version of dynamic-import satisfies all constraints: @0.5.4, @=0.5.2, @~0.5.4
Constraints on package "dynamic-import":
* dynamic-import@0.5.4 <- top level
* dynamic-import@=0.5.2 <- top level
* dynamic-import@~0.5.4 <- top level
* dynamic-import@0.5.4 <- ecmascript 0.14.4
* dynamic-import@0.5.4 <- typescript 4.1.2
Package.onUse(function (api) {
api.versionsFrom(['1.8.2', '1.12']); // use versionsFrom with a range instead of hard links on individual packages
api.use('tracker');
api.use('ecmascript');
api.use('typescript');
api.mainModule('index.js', ['client', 'server'], { lazy: true });
});
In the cases of typescript and ecmascript there’s actually no reason a package which uses those should pull them in to the consumer’s project, since they are compile time packages. I’m not sure how that’s resolved by meteor.
Getting the dynamic-import error on new projects even after re-installing Meteor. Any ideas?
➜ examples-new meteor create parties
=> Errors while creating your project
While selecting package versions:
error: No version of dynamic-import satisfies all constraints: @=0.5.2, @~0.5.4
Constraints on package "dynamic-import":
* dynamic-import@=0.5.2 <- top level
* dynamic-import@~0.5.4 <- top level
* dynamic-import@0.5.4 <- ecmascript 0.14.4
* dynamic-import@0.5.4 <- typescript 4.1.2
When you have multiple top level constraints, the exact (@=) constraint is usually caused by having a local package. Check if any of the folders in the METEOR_PACKAGE_DIRS env var contains a dynamic-import package.