0

I have installed Angular and Cli again, but when i run "ng new app" I get this error:

internal/modules/cjs/loader.js:316
      throw err;
      ^

Error: Cannot find module 'C:\Users\zorni\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\symbol-observable\lib\index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:308:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:521:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\zorni\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js:29:1)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\Users\\zorni\\AppData\\Roaming\\npm\\node_modules\\@angular\\cli\\node_modules\\symbol-observable\\package.json',
  requestPath: 'symbol-observable'
}

I really don't have such folder lib here: C:\Users\zorni\AppData\Roaming\npm\node_modules@angular\cli\node_modules\symbol-observable but I don't know how to fix this.

Zorry
  • 21
  • 5
  • Try re installing angular with: `npm install -g @angular/cli` – shaktimaan Jul 08 '21 at 08:27
  • I have tried and got this: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: 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. C:\Users\zorni\AppData\Roaming\npm\ng -> C:\Users\zorni\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng ... – Zorry Jul 08 '21 at 08:47
  • still not working – Zorry Jul 08 '21 at 08:51
  • Try this link and clearing your NPM cache. https://stackoverflow.com/questions/60235086/angular-cli-install-fails-with-deprecated-request2-88-2-request-has-been-depr – Robin Webb Jul 08 '21 at 08:56

1 Answers1

0

I have reinstalled Node JS and now it's working.

Zorry
  • 21
  • 5