-
Notifications
You must be signed in to change notification settings - Fork 331
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
issue: "Import in body of module; reoder to top", thrown by CRA next branch. #450
Comments
Does that mean CRA 2.0 is running |
It looks like projects created with |
It may be related to CRA@next introducing monorepo support, and there, being able to source code from below its own root. The offending code is then in the nwb module `es`
directory, not in node_modules.
|
Sounds like this should be a CRA bug report instead? |
Ah, I missed the significance of the monorepo part - is there a way to configure it so CRA uses |
@gaearon I don't know enough details, filed here because it seemed that es modules should satisfy the I'll file it at CRA instead. |
This issue is a:
For my module, nwb has created an
es
folder with anindex.js
file starting as follows:I'm using this in a monorepo together with
create-react-app
next branch2.0.0-next.b2fd8db8
.Running a CRA app with a dependency on my nwb lib errors out with
error Import in body of module; reorder to top
I just confirmed this does not happen with
react-scripts
version1.1.2
, it will run fine.I'm posting this here for now as I believe the error thrown by CRA is valid.
I will look at a repro in case this is not an obvious issue.
Is the version of
nwb
you're using installed globally or locally?global
Which versions of Node.js, npm and nwb are you using (if using it globally)?
Which modules are installed in your project?
n.a. I think as the bug is triggered at a consumer.
The text was updated successfully, but these errors were encountered: