Skip to content

Facing issue while running npm install (in yargs repo) #2408

Description

@vinodk99

Facing issue while running npm install. for the latest version:v17.7.2

`git branch

  • (HEAD detached at v17.7.2)
    main
    [root@e4c3cb223859 yargs]# node -v
    v16.20.2
    [root@e4c3cb223859 yargs]# npm install

[email protected] prepare
npm run compile

[email protected] compile
rimraf build && tsc

[email protected] postcompile
npm run build:cjs

[email protected] build:cjs
rollup -c rollup.config.cjs

./lib/cjs.ts → ./build/index.cjs...
[!] (plugin Typescript) TypeError: path.charCodeAt is not a function
lib/cjs.ts
TypeError: path.charCodeAt is not a function
at getEncodedRootLength (/yargs/node_modules/typescript/lib/typescript.js:7683:24)
at Object.isRootedDiskPath (/yargs/node_modules/typescript/lib/typescript.js:7590:16)
at Object.isExternalModuleNameRelative (/yargs/node_modules/typescript/lib/typescript.js:12458:52)
at tryLoadModuleUsingOptionalResolutionSettings (/yargs/node_modules/typescript/lib/typescript.js:44139:17)
at tryResolve (/yargs/node_modules/typescript/lib/typescript.js:44347:28)
at /yargs/node_modules/typescript/lib/typescript.js:44343:69
at Object.forEach (/yargs/node_modules/typescript/lib/typescript.js:181:30)
at nodeModuleNameResolverWorker (/yargs/node_modules/typescript/lib/typescript.js:44343:25)
at nodeModuleNameResolver (/yargs/node_modules/typescript/lib/typescript.js:44313:16)
at Object.resolveModuleName (/yargs/node_modules/typescript/lib/typescript.js:44040:30)

npm ERR! code 1
npm ERR! path /yargs
npm ERR! command failed
npm ERR! command sh -c -- npm run compile

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-05-03T06_32_05_397Z-debug-0.log
`

OS-Version:
NAME="Red Hat Enterprise Linux"
VERSION="9.3 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions