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

Updates for ESM only modules #360

Open
philnash opened this issue Sep 27, 2021 · 4 comments
Open

Updates for ESM only modules #360

philnash opened this issue Sep 27, 2021 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@philnash
Copy link
Contributor

Modules like ora@6 and wrap-ansi@8 (and upcoming chalk@5 and boxen@6) have updated to publish pure ESM packages.

The things to do to update this are listed in this gist, but we need to consider how making these upgrades could affect our build as well as dependent modules that we don't control.

@dkundel
Copy link
Member

dkundel commented Sep 27, 2021

Good point. I think we also need to consider whether this affects the local dev experience in some way. We heavily rely on require even though most of our code uses import statements already.

@philnash
Copy link
Contributor Author

In TypeScript we consume modules using import however with our current settings that is transpiled to a require which fails to load pure ESM packages.

@dkundel
Copy link
Member

dkundel commented Aug 26, 2022

Update to this ticket: at least the serverless-api package is now configured in a way that it does not compile away inline await import() but it does still convert everything else to require. This should solve that problem if we change the settings in the other packages as well

@JuanSanabria-SEAQ
Copy link

I'm having a problem which may be generated by the wrap-ansi package

Installing plugin @twilio-labs/plugin-serverless... ⣟ [2/4] Fetching packages...
Installing plugin @twilio-labs/plugin-serverless... ⣯ [2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.20.2"
error Found incompatible module.
Installing plugin @twilio-labs/plugin-serverless... ⣷ info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Installing plugin @twilio-labs/plugin-serverless... failed
    Error: yarn add @twilio-labs/plugin-serverless@v2 --non-interactive 
    --mutex=file:/home/runner/.twilio-cli/yarn.lock 
    --preferred-cache-folder=/home/runner/.twilio-cli/yarn --check-files 
    exited with code 1
Error: Process completed with exit code 1.

What can I do to solve this problem?

@makserik makserik added the bug Something isn't working label Mar 25, 2024
@makserik makserik added this to the Post v3 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants