Skip to content

NodeJS packed as correlation payload doesn't preserve symbolic links #64473

Closed

Description

@maraf

NodeJS packed as correlation payload doesn't preserve symbolic links. Instead it copies target files to places where links sit.

node/14.15.5_64bit should contain

npm -> ../lib/node_modules/npm/bin/npm-cli.js*
npx -> ../lib/node_modules/npm/bin/npx-cli.js*

Running npm could cause errors like (#64330)

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module '../lib/utils/unsupported.js'
Require stack:
- /datadisks/disk1/work/BA3509B2/p/build/emsdk/node/14.15.5_64bit/bin/npm
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at /datadisks/disk1/work/BA3509B2/p/build/emsdk/node/14.15.5_64bit/bin/npm:19:21
    at Object.<anonymous> (/datadisks/disk1/work/BA3509B2/p/build/emsdk/node/14.15.5_64bit/bin/npm:155:3)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/datadisks/disk1/work/BA3509B2/p/build/emsdk/node/14.15.5_64bit/bin/npm'
  ]
}

Possible solutions

  • Use cli zip to pack the nodejs with correct symlinks
  • Install/extract nodejs on Helix using emsdk installation script (it uses python to download and extract it).
  • Download and extract nodejs from official site, like emsdk does it.
  • Install nodejs on Helix VM image
  • Use nodejs from emsdk nuget package (it is stripped, eg npm is missing)

Activity

  1. ghost added
    untriaged
    on Jan 28, 2022
  2. radical commented on Jan 31, 2022

    @radical
    Member
  3. akoeplinger commented on Feb 1, 2022

    @akoeplinger
    Member

    Yes I think this is a side-effect of the .NET zip APIs not supporting symbolic links (afaik that only changed recently).

  4. removed
    untriaged
    on Feb 1, 2022
  5. ghost added
    in-pr
    on Feb 8, 2022
  6. ghost removed
    in-pr
    on Feb 9, 2022
  7. ghost locked as resolved and limited conversation to collaborators on Mar 11, 2022
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

    arch-wasmarea-Infrastructure-mono

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions