Closed dtarnawsky closed 1 year ago
In Version 1.48.0 the error still/again exists if i downgrade to 1.45.4 the error is gone please reopen
[error] Unable to run 'npm outdated --json'. Try reinstalling node modules.
Hey @oweitman, I'm having a hard time reproducing an issue with 1.48.0. Are you able to supply a sample project with the problem? (you can send to damian at ionic.io)
hi,
yes it is easy:
[error] Unable to run 'npm outdated --json'. Try reinstalling node modules.
this error is repeated everytime i select a different command in the ionic extension
versions: vscode Version: 1.80.2 (user setup) Commit: 2ccd690cbff1569e4a83d7c43d45101f817401dc Date: 2023-07-27T20:40:28.909Z Electron: 22.3.14 ElectronBuildId: 22695494 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045
ionic extension: v1.48.0
if you need more informations, please comment if i should upload the sources to github, no problem, but the source are unchanged from your scaffolding process
Thanks, can you runionic -v
and see what version of the Ionic CLI you are using?
Also, if you try this by creating the project with the VS Code extension does it work?
ionic CLI is 7.1.1
if i try the extension wizard to create a project, i noticed other problems
Hi @oweitman, just an FYI: version 1.49.0 is out and fixes the errors related to creating a new project on a Window machine.
I saw that you have https://github.com/ionic-team/vscode-extension/issues/129 open, and i'll use that to see if there is a fix related to your test steps.
I (still) have the same error.
My setup is as follows: I'm using PNPM and the Capacitor app is in a subfolder "/app", with it's own package.json and pnpm-lock.yaml file.
The Ionic Extension correctly discovers the subfolders as projects, but still tries to use NPM instead of PNPM.
Hi @danbaechtold, are you able to provide a sample reproduction of a project with the problem? Also, does the root folder contain a package-lock.json file which may cause the extension to think you are using npm?
Hi @dtarnawsky,
No, the root folder does not contain a package-lock.json.
Unfortunately it's a client's project, so I can't, but it's simple to reproduce:
The error will then appear in the extension's output/console:
[error] Unable to run 'npm outdated --json'. Try reinstalling node modules.
Thanks for details @danbaechtold , this issue is now fixed in version 1.55 released today. You would normally setup pnpm with workspaces to do this but now the extension also understands if you are just using a folder based structure with subfolders that are pnpm based.
@dtarnawsky Awesome thank, works! :)
This issue has been resolved in v1.45.4 where pnpm outdated and pnpm list are now being used when pnpm is used as the package manager.