2

I have an Angular 6 project and when I try to execute it, it throws the following error:

Could not find module "@angular-devkit/build-angular" from "C:\\Users\\fernando.cavalcante\\Desktop\\Fernando_Backup\\VisualStudio2017\\Projects\\GerenciadorDiretorioAPI\\Presentattion".
Error: Could not find module "@angular-devkit/build-angular" from ...

I tried to update the packages but when I run npm install command, cmd throws the following message:

npm WARN tar ENOENT: no such file or directory, open 'C:\Users\me\Desktop\Folder1\Projects\My.Project\Developing\0 - Presentation\My.Project\node_modules\.staging\es5-ext-b75d419b\test\reg-exp\#\sticky\is-implemented.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 403 Forbidden: fsevents@https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz

npm ERR! code EINTEGRITY
npm ERR! sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q= integrity checksum failed when using sha1: wanted sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q= but got sha1-pMeCeEFUzmIX1LXY6ZTg7bwjcDY=. (4472399 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\me\AppData\Roaming\npm-cache\_logs\2018-05-18T13_11_28_030Z-debug.log

I searched some solutions here, here, here and here, tried to reinstall Node, reinstall Angular and even searched in some unresolved questions but nothing worked for me.

I also tried this solution and run npm clean cache -f but didn't work.

I don't know how to proceed.

I'm using Angular CLI: 6.0.1 and Node: 8.11.2

Fernando Paz
  • 532
  • 6
  • 19

3 Answers3

2

Delete package-lock.json, even with @angular/cli @ version 7, I'm using version 6, and was having the same issue. Deleting the package-lock.json fixed this error for me. There was no need to delete node_modules as it would not even install any packages, but only throw errors.

Dustin Hammack
  • 154
  • 1
  • 1
  • 15
1

Delete your node_modules folder. rm -rf node_modules

Delete your package.lock.json file.

Might want to update your angular cli.

npm install -g @angular/cli@latest

or first run npm uninstall -g @angular/cli then npm install -g @angular/cli@latest

Now run npm install.

Alf Moh
  • 7,159
  • 5
  • 41
  • 50
  • It throws this error: `npm ERR! code EINTEGRITY npm ERR! sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw== integrity checksum failed when using sha512: wanted sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw== but got sha512-RHa70BV45f+STdQcnd+HMxg/xlFoZmEY4DZsUvfokR5Ts67zVcKENE4PfChk3he+4L29QUG5b7n97WGseaxr3w==. (1064527 bytes)` – Fernando Paz May 18 '18 at 14:32
  • Don't know what it means and have a lot of warnings after this error – Fernando Paz May 18 '18 at 14:33
  • Try `npm cache verify` or `npm cache clean` – Alf Moh May 18 '18 at 16:21
0

Install dev dependency.

npm install --save-dev @angular-devkit/build-angular

Is a new package in Angular 6

Matteo Ponzo
  • 47
  • 1
  • 3