Search code examples
angularmoduleuuid

Why does Angular give me this error, when I have needed modules?


When I try to use command ng it gives me this error.

Unknown error: Error: Package exports for '\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\uuid' do not define a valid '.' target

I have tried to uninstall and install angular, update node modules everything, but nothing seems to solve this problem


Solution

  • Nodejs version v13 had known issues with this. Tried with v12.16.3 and it's working. Either use latest v14.5.0 or official LTS v12.16.3.

    FYI: Check node version with node -v on command prompt/ terminal