angularnpmnpm-installnpm-package

Can't use cli angular cli command since v18 update


I try tο update my angular cli version as usual for test it, but since I did this update I have a node error when I try to use cli command.

All of my other global dependencies seem to work.

I try to downgrade angualr cli version, node version, remove them and reinstall them but it doesn't work.

The error is the following:

node:internal/modules/cjs/loader:1148 throw err; ^ Error: Cannot find module 'C:\Users\Xavie\node_modules@angular\cli\bin\ng.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15) at Module._load (node:internal/modules/cjs/loader:986:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }


Solution

  • Update

    I find the problems it seems that bun also has @angular/cli installed globally and it's provide conflict with npm dependencies