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

Sometimes doesn't work with node version more than 12.19.x #501

Closed
adevnadia opened this issue Jan 13, 2021 · 10 comments · Fixed by #502
Closed

Sometimes doesn't work with node version more than 12.19.x #501

adevnadia opened this issue Jan 13, 2021 · 10 comments · Fixed by #502

Comments

@adevnadia
Copy link
Contributor

adevnadia commented Jan 13, 2021

It looks like that compiled might have a hard dependency on node version. In my current setup, which uses next.js and atlaskit components, the build in CI (github actions if important) started failing after I added @atlaskit/lozenge to the mix. Babel plugin is installed.

failed-build

It was mitigated by reducing node version to the version 12.16.x from just 12.x. Not sure how to reproduce this setup in isolation without spending days on it, hope the description and the screen will help :)

UPD:

12.15.x node version - everything is good
12.19 - fails (so starts failing somewhere in between, probably when they enabled modules support by default)
14.15.1 (latest of 14.x) - still failing
15.5.1 (latest of 14.x) - still failing

UPD:
PR with the fix: #502

@itsdouges
Copy link
Collaborator

itsdouges commented Jan 13, 2021

🤔

what version of compiled in your lock file?

(also hi!!!)

@adevnadia
Copy link
Contributor Author

adevnadia commented Jan 13, 2021

0.5.3

👋🏼 🙋🏼‍♀️

@itsdouges
Copy link
Collaborator

itsdouges commented Jan 13, 2021

Re: Babel plugin being installed, we have a issue to remove it #493

for lozenge, it seems its calling to CJS is then calling out to the ESM compiled bundle... i wonder why?

main looks correct https://github.com/atlassian-labs/compiled/blob/master/packages/react/package.json#L14

is something prioritizing the module bundles?

@itsdouges
Copy link
Collaborator

this issue was raised in next which was fixed with the addition of adding CJS exports #387

is anything custom in your build setup? 🤔 (or alternatively any ideas what could be happening? hehe)

@adevnadia
Copy link
Contributor Author

adevnadia commented Jan 13, 2021

Iiiinteresting 🤔 In builds there is nothing special, just next build, next.js is latest. And webpack config is standard next.js with next-images config with the addition of babel-loader and a few plugins (magnetic-di and emotion).

Curious why newer node solves it, maybe they made some changes there?

@adevnadia
Copy link
Contributor Author

adevnadia commented Jan 13, 2021

Okay, I slightly bullshiting here, not the latest version, it's the opposite. Managed to miss that current recommended node is already 14x. After a bit of digging and CI abusing:

  • 12.15.x node version - everything is good
  • 12.19 - fails (so starts failing somewhere in between, probably when they enabled modules support by default)
  • 14.15.1 (latest of 14.x) - still failing
  • 15.5.1 (latest of 14.x) - still failing

@adevnadia adevnadia changed the title Possible hard dependency on latest node version Sometimes doesn't work with node version more than 12.19.x Jan 13, 2021
@pgmanutd
Copy link
Contributor

@adevnadia: I added this comment for packages which are not getting transpiled by next.js (which are coming from node_modules). Can you try solution mentioned here. Looks like they are using next-transpile-modules plugin for transpiling esm packages.

@adevnadia
Copy link
Contributor Author

@pgmanutd found a better solution here: #502

@Madou if it doesn't break Atlaskit I expect a kudos from you 😝 😝 😝

@itsdouges
Copy link
Collaborator

itsdouges commented Jan 13, 2021 via email

@pgmanutd
Copy link
Contributor

Noice @adevnadia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants