-
Notifications
You must be signed in to change notification settings - Fork 994
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 (in yargs repo) #2408
Comments
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 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? |
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 |
Facing issue while running npm install. for the latest version:v17.7.2
`git branch
main
[root@e4c3cb223859 yargs]# node -v
v16.20.2
[root@e4c3cb223859 yargs]# npm install
./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"
`
The text was updated successfully, but these errors were encountered: