Skip to content

yarn install fails on node v20 #1531

Closed
Closed

Description

@coolaj86
  1. Clone repo
    git clone --depth=1 [email protected]:dashpay/platform.git ./dashpay-platform/
    pushd ./dashpay-platform/
  2. Install deps onto Ubuntu 22.04 LTS
    sudo apt install -y \
        build-essential \
        clang \
        cmake \
        g++ \
        gcc \
        libgmp-dev \
        libpython3.10-dev \
        libssl-dev \
        libzmq3-dev \
        pkg-config
    apt install -y \
        protobuf-compiler
  3. Install node@18
    curl https://webi.sh/node@20 | sh
    source ~/.config/envman/PATH.env
  4. Install platform
    corepack enable
    yarn install
  5. Experience the pain and sadness of the empty void...
# This file contains the result of Yarn building a package (protobufjs@npm:6.11.4)
# Script name: postinstall


node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
TypeError [Error]: [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///mnt/dashstore/app/dashpay-platform/.yarn/unplugged/protobufjs-npm-6.11.4-af11968b80/node_modules/protobufjs/package.json" needs an import assertion of type "json"
    at load$1 (file:///mnt/dashstore/app/dashpay-platform/.pnp.loader.mjs:1458:17)
    at nextLoad (node:internal/modules/esm/hooks:833:28)
    at Hooks.load (node:internal/modules/esm/hooks:416:26)
    at handleMessage (node:internal/modules/esm/worker:168:24)
    at checkForMessages (node:internal/modules/esm/worker:117:28)
    at process.<anonymous> (node:internal/modules/esm/worker:136:5)
    at process.emit (node:events:514:28)
    at process.emit (/mnt/dashstore/app/dashpay-platform/.pnp.cjs:28770:25) {
  code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING'
}

Node.js v20.9.0

Activity

  1. added
    bug
    on Oct 26, 2023
  2. pshenmic commented on Oct 26, 2023

    @pshenmic
    Contributor

    I can see the same message on the node v18 on the fresh ubuntu instance, will be investigating

  3. coolaj86 commented on Oct 27, 2023

    @coolaj86
    Author

    Interesting, because once I switched node versions and reran it, it worked.

  4. coolaj86 commented on Oct 27, 2023

    @coolaj86
    Author

    I believe a new point release of v18 just came out, so it could be an npm-hosted static build (maybe the json protoc) that hasn't yet been republished.

  5. pshenmic commented on Dec 10, 2023

    @pshenmic
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions