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

Cannot install the latest version if generator-jhipster from sources #22606

Closed
1 task done
spotlesscoder opened this issue Jun 18, 2023 · 3 comments
Closed
1 task done

Comments

@spotlesscoder
Copy link
Contributor

Overview of the issue

Trying to install, I get the following error message

C:\Users\user>npm i -g https://github.com/jhipster/generator-jhipster
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\ProgramData\\nvm\\v18.16.0\\node_modules\\generator-jhipster',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\ProgramData\nvm\v18.16.0\node_modules\generator-jhipster\node_modules\mem-fs\node_modules\@types'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\ProgramData\\nvm\\v18.16.0\\node_modules\\generator-jhipster\\node_modules\\mem-fs\\node_modules\\@types'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\ProgramData\nvm\v18.16.0\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\user\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\user\AppData\Local\npm-cache\_cacache\tmp\git-clone53f5Ww
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm run build
npm ERR! npm ERR! > [email protected] build
npm ERR! npm ERR! > npm run compile && npm run copy-files && npm run compile-types && npm run copy-types
npm ERR! npm ERR!
npm ERR! npm ERR!
npm ERR! npm ERR! > [email protected] compile
npm ERR! npm ERR! > tsc
npm ERR! npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! 'tsc' is not recognized as an internal or external command,
npm ERR! npm ERR! operable program or batch file.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2023-06-18T14_46_22_304Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2023-06-18T14_45_18_941Z-debug-0.log

C:\Users\user>
Motivation for or Use Case

I wanted to try the latest bugfixes just merged

Reproduce the error

Install node version 18 on windows 11, run

npm i -g https://github.com/jhipster/generator-jhipster

Related issues

Could not find any

Suggest a Fix
JHipster Version(s)

8.0.0-beta.1

  • Checking this box is mandatory (this is just to show you read everything)
@JeroenAdam
Copy link

Why not installing with this? npm install -g generator-jhipster

@spotlesscoder
Copy link
Contributor Author

Because the fix that was merged to the main branch was just merged a few hours ago while the latest available release on npmjs is from 7 days ago

@spotlesscoder
Copy link
Contributor Author

I found out how to do it now

1.) git clone https://github.com/jhipster/generator-jhipster
2.) cd generator-jhipster
3.) npm i -g typescript
4.) npm i -g @types/node
5.) npm ci
6.) npm link
7.) cd .. && mkdir my-app && cd my-app
8.) jhipster --skip-jhipster-dependencies
9.) Follow the instructions
10.) npm link generator-jhipster

@DanielFran DanielFran added this to the 8.0.0-beta.2 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants