Agoric / dapp-agoric-basics

This is a simple app for the Agoric smart contract platform.
0 stars 3 forks source link

Cannot find package '@endo/init' with node LTS (v20.12.1) #35

Open dckc opened 5 months ago

dckc commented 5 months ago

reporting on behalf of @kbennett2000

work-around: use Node v18.18.0

INSTALLATION:

yarn create @agoric/dapp --dapp-template dapp-agoric-basics agoric-basics --dapp-branch 977-mint-tickets-ui
cd agoric-basics
yarn install
yarn start:docker
yarn docker:logs
yarn start:contract
yarn start:ui

ERRORS:

agoric@AgoricVM:~/Desktop/agoric-basics$ yarn start:contract
yarn run v1.22.22
$ cd contract && yarn start
$ make clean start-contract; yarn docker:make print-key
yarn node scripts/deploy-contract.js \
    --install src/sell-concert-tickets.contract.js \
    --eval src/platform-goals/board-aux.core.js \
    --eval src/sell-concert-tickets.proposal.js
node:internal/modules/esm/resolve:854
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@endo/init' imported from /home/agoric/Desktop/agoric-basics/contract/scripts/deploy-contract.js
    at packageResolve (node:internal/modules/esm/resolve:854:9)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1157:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.12.1
error Command failed.
Exit code: 1
Command: /home/agoric/.nvm/versions/node/v20.12.1/bin/node
Arguments: scripts/deploy-contract.js --install src/sell-concert-tickets.contract.js --eval src/platform-goals/board-aux.core.js --eval src/sell-concert-tickets.proposal.js
Directory: /home/agoric/Desktop/agoric-basics/contract
Output:

info Visit https://yarnpkg.com/en/docs/cli/node for documentation about this command.
make: *** [Makefile:74: start-contract-mint] Error 1
$ docker compose exec agd make -C /workspace/contract print-key
WARN[0000] /home/agoric/Desktop/agoric-basics/docker-compose.yml: `version` is obsolete 
make: Entering directory '/workspace/contract'
make: *** No rule to make target '/root/.agoric/user1.key', needed by 'print-key'.  Stop.
make: Leaving directory '/workspace/contract'
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
agoric@AgoricVM:~/Desktop/agoric-basics$ yarn start:ui
yarn run v1.22.22
$ cd ui && yarn dev
$ vite
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

originally: https://github.com/Agoric/documentation/pull/1065#issuecomment-2064205551

ivanlei commented 5 months ago

The upgrade-14 (current) release of Agoric-sdk says:

Node Version Node.js 16.13 or higher (previous LTS) or Node.js 18.12 or higher (maintenance LTS). Please note the current active LTS of Node 20 is not yet officially supported.