Skip to content
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

'No "exports" main resolved in' @babel/helper-compilation-targets/package.json when running build in WSL 2 #783

Closed
danielkcz opened this issue Jul 28, 2020 · 2 comments
Labels
scope: upstream Issue in upstream dependency solution: duplicate This issue or pull request already exists

Comments

@danielkcz
Copy link
Contributor

Current Behavior

image

Expected behavior

It should finish the build successfully.

Suggested solution(s)

I am not sure if it doesn't boil down to some issue in Babel, would like to know your opinion before escalating it.

Additional context

The WSL 2 is the latest Windows Subsystem for Linux. So far it worked pretty well for all tasks, this is the first bummer. Running build directly on Windows works without an issue, so that's some potential culprit here. Unless it's a problem of Ubuntu (or any *nix system). I can't verify that.

I tried to reproduce the issue in some minimal environment, but no luck so far. The same is happening when building either mobx-react or mobx-react-lite packages. You can clone those and try npm run build, but I don't suppose anyone here has access to Ubuntu or Windows :)

Your environment

Software Version(s)
TSDX 0.13.2
TypeScript 3.7.5
Yarn 1.22.4
Node 14.4.0
Operating System Ubuntu 20.4 (in WSL2)
@agilgur5 agilgur5 changed the title ERR_PACKAGE_PATH_NOT_EXPORTED running build inside WSL 2 'No "exports" main resolved' running build inside WSL 2 Jul 29, 2020
@agilgur5
Copy link
Collaborator

Duplicate of #630

I am not sure if it doesn't boil down to some issue in Babel, would like to know your opinion before escalating it.

The error isn't coming from TSDX, so I would say that would be a better place to start. Per the issue this duplicates, it is upstream in Babel and actually upstream in Node.

You wrote that you're on Node 14.4 which is confusing as the issue should be limited to Node 13.1-13.8, but #747 and its upstream issues point to a potential regression in Node.

but I don't suppose anyone here has access to Ubuntu or Windows

Not readily, but the test suite runs in a matrix which includes both Ubuntu and Windows:
https://github.com/formium/tsdx/blob/5e5c3f804e68609083be978a080ab905dc7ec19d/.github/workflows/nodejs.yml#L32

@agilgur5 agilgur5 added solution: duplicate This issue or pull request already exists scope: upstream Issue in upstream dependency labels Jul 29, 2020
@agilgur5 agilgur5 changed the title 'No "exports" main resolved' running build inside WSL 2 'No "exports" main resolved in' @babel/helper-compilation-targets/package.json when running build in WSL 2 Jul 29, 2020
@danielkcz
Copy link
Contributor Author

Thanks @agilgur5, that's really interesting. It's true that on WIndows machine itself I have Node 10.20.1, so that would be probably a reason why it works there.

At least on Ubuntu I can use NVM. Upon switching to 12.16.3 it works as well, but 12.17.0 is where it got broken apparently. So I am fine with a solution like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: upstream Issue in upstream dependency solution: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants