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

Facing issue while running npm install. #2408

Open
vinodk99 opened this issue May 3, 2024 · 4 comments
Open

Facing issue while running npm install. #2408

vinodk99 opened this issue May 3, 2024 · 4 comments

Comments

@vinodk99
Copy link

vinodk99 commented May 3, 2024

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"
`

@shadowspawn
Copy link
Member

I reproduced this building against the v17.7.2 tag. That build broke due to changes in dependencies which are picked up in a clean install. There have been some commits to main branch to fix build. Do you need exact v17.7.2 in particular?

Note also, there is a pending PR for an issue with recent TypeScript (#2393) which you could work around by pinning back TypeScript to before 5.4.0.

@vinodk99
Copy link
Author

vinodk99 commented May 6, 2024

I reproduced this building against the v17.7.2 tag. That build broke due to changes in dependencies which are picked up in a clean install. There have been some commits to main branch to fix build. Do you need exact v17.7.2 in particular?

Note also, there is a pending PR for an issue with recent TypeScript (#2393) which you could work around by pinning back TypeScript to before 5.4.0.

@shadowspawn i need fixes for v17.7.2 can you provide that?

@shadowspawn
Copy link
Member

shadowspawn commented May 7, 2024

One simple workaround is to do the build using the dependencies available at the time. I got the target date from the CHANGELOG:

git checkout tags/v17.17.2
rm -rf node_modules package-lock.json
npm --before 2023-04-27 install

@vinodk99
Copy link
Author

vinodk99 commented May 7, 2024

One simple workaround is to do the build using the dependencies available at the time. I got the target date from the CHANGELOG:

git checkout tags/v17.17.2
rm -rf node_modules package-lock.json
npm --before 2023-04-27 install

@shadowspawn thanks for the above steps, now install and tests are passing for v17.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants