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

Add Node 14 to "engines" for all dapps #4002

Open
2 of 13 tasks
katelynsills opened this issue Oct 26, 2021 · 10 comments
Open
2 of 13 tasks

Add Node 14 to "engines" for all dapps #4002

katelynsills opened this issue Oct 26, 2021 · 10 comments
Labels
Dapp & UI Support enhancement New feature or request good first issue Good for newcomers tooling repo-wide infrastructure

Comments

@katelynsills
Copy link
Contributor

katelynsills commented Oct 26, 2021

What is the Problem Being Solved?

In our dapps, if the Node version is below 14, we get a mysterious error message:

katesills@kates-mbp dapp-card-store-2 % agoric install
(node:65896) ExperimentalWarning: The ESM module loader is experimental.
file:///Users/katesills/code/agoric-sdk/packages/marshal/src/marshal.js:6
import { Nat } from '@agoric/nat';
         ^^^
SyntaxError: The requested module '@agoric/nat' does not provide an export named 'Nat'
    at ModuleJob._instantiate (internal/modules/esm/module_job.js:92:21)
    at async ModuleJob.run (internal/modules/esm/module_job.js:107:20)
    at async Loader.import (internal/modules/esm/loader.js:176:24)

We need to improve the error message to point users to the appropriate Node version.

Description of the Design

Add

  "engines": {
    "node": ">=14.15.0"
  },

to the package.json in the root folder of the dapps.

This gives a much better error message:

error dapp-card-store@0.0.1: The engine "node" is incompatible with this module. Expected version ">=14". Got "13.12.0"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Security Considerations

None

Test Plan

None

List of dapps:

  • dapp-card-store
  • dapp-treasury
  • dapp-fungible-faucet
  • testnet-load-generator
  • documentation
  • dapp-otc
  • dapp-nft-drop
  • dapp-loan
  • dapp-token-economy
  • dapp-simple-exchange
  • dapp-autoswap
  • dapp-oracle
  • dapp-pegasus
@katelynsills katelynsills added the enhancement New feature or request label Oct 26, 2021
@katelynsills katelynsills added good first issue Good for newcomers Small labels Oct 27, 2021
@dckc dckc added tooling repo-wide infrastructure Dapp & UI Support labels Oct 27, 2021
@namangirdhar16
Copy link

@katelynsills i would like to work on this, please assign this to me.

@katelynsills
Copy link
Contributor Author

Hi @namangirdhar16, consider yourself assigned (We can only officially assign people in our Github organization, so the "assignee" will remain blank. Let me know if you have any questions! I think this will require a number of different PRs in each of the different repositories (dapp-card-store, etc.)

@namangirdhar16
Copy link

@katelynsills i guess i understand what needs to be done here, for the sake of confirmation i would like to ask do i just need to go in each project folder and update the package.json file with node version greater than 14?

@katelynsills
Copy link
Contributor Author

Yes, that's right!

@namangirdhar16
Copy link

Thanks!!

@namangirdhar16
Copy link

@katelynsills in the package.json of this project, the node version is already updated to the desired one.

@katelynsills
Copy link
Contributor Author

Yup, you're right. We need to make sure all of the dapps are updated, which have their own repos, like https://github.com/Agoric/dapp-fungible-faucet

@namangirdhar16
Copy link

namangirdhar16 commented Oct 30, 2021

Ok got it!, but there is no such issue in these dapps repo, should i create one and then make a PR, is it possible somehow to refercence this issue in other repos or should i just go with a new one? Thanks for the quick response btw.

@katelynsills
Copy link
Contributor Author

Ok got it!, but there is no such issue in these dapps repo, should i create one and then make a PR, is it possible somehow to refercence this issue in other repos or should i just go with a new one? Thanks for the quick response btw.

Just referencing this issue is fine, but I appreciate the issues and PRs that you've made! Thank you so much!

@turadg
Copy link
Member

turadg commented Feb 7, 2022

Note that our minimum Node is presently 14.17.0. When we get to this we should also update other references to the required version. #4460 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dapp & UI Support enhancement New feature or request good first issue Good for newcomers tooling repo-wide infrastructure
Projects
None yet
Development

No branches or pull requests

5 participants