Could not find module "@angular-devkit/build-angular" after npm install

cannot find module '@angular
cannot find module 'typescript
node cannot find local module
cannot find module npm
error cannot find module 'discord
error: cannot find module 'newman
node module not found
cannot find module 'express'

After running npm install then npm update I got this error when using ng serve:

Could not find module "@angular-devkit/build-angular" from "C:\\Users\\Matt\\Coding\\chart".
Error: Could not find module "@angular-devkit/build-angular" from "C:\\Users\\Matt\\Coding\\chart".

Then checking the angular version, build-angular is there.

ng version


Package                            Version
@angular-devkit/architect          0.11.0 (cli-only)
@angular-devkit/build-angular      <error>
@angular-devkit/build-ng-packagr   <error>
@angular-devkit/core               7.1.0 (cli-only)
@angular-devkit/schematics         7.1.0 (cli-only)
@schematics/angular                7.1.0 (cli-only)
@schematics/update                 0.11.0 (cli-only)
ng-packagr                         <error>
rxjs                               6.3.3 (cli-only)
typescript                         3.1.6 (cli-only)

I have the same error. I fixed with follow commands:

  1. install build-angular with this command:

      `npm i --save-dev @angular-devkit/build-angular`
  2. then install build-ng-packagr:

      `npm i --save-dev @angular-devkit/build-ng-packagr`
  3. finally install ng-packagr:

      `npm i --save-dev ng-packagr`

note: the version of installed package will be related with angular version.

I hope is useful.

How to solve "Error: Cannot find module '*.js'" with Node.js , Introduction. If you are trying to run your Node.js application and you get something like this: Error: Cannot find module 'C:\Users\Me\my_app.js'. This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x – SanSolo Dec 20 '18 at 11:18 add a comment | 3

What worked for me was uninstall my @angular/cli , then removed node_modules directory and package-lock.json file, then reinstall @angular/cli. Example:

#npm uninstall  @angular/cli@7.1.3
#rm -rf node_modules
#rm package-lock.json
#npm install  @angular/cli@7.1.3

Node.JS: Error Cannot find module [SOLVED] – imcodebased, Even though I have installed my npm package globally, I receive the following error : Error: Cannot find module 'color' at Function.Module. Issue resolution steps for fixing Angular error "Can not find module "@angular-devkit/build-angular" in Angular 8 or Angular 9 projects build command.

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

Uncaught Error: Cannot find module "." · Issue #4921 · webpack , Do you want to request a feature or report a bug? bug What is the current behavior? Below exception: polyfills.js:1 Error: Cannot find module ". FileNotFoundError: Could not find module 'libvlc.dll' Ask Question Asked 6 months ago. Active 2 months ago. Viewed 4k times 2. 1. Using Python 3.8.0, 64 bit

Haven't you seen these two lines?

@angular-devkit/build-angular      <error>
@angular-devkit/build-ng-packagr   <error>

I encountered similar issues today and solved by npm uninstall @angular/cli@7.3.8; just that, nothing more and then I can run ng build --prod --stats-json as expected.

Before uninstallation, there is the error similar to yours but mine is @angular-devkit/build-ng-packagr.

$ ng build --stats-json
Could not find module "@angular-devkit/build-ng-packagr" from "/home/hearen/git/repos/ng-hue-lib".
Error: Could not find module "@angular-devkit/build-ng-packagr" from "/home/hearen/git/repos/ng-hue-lib".
    at Object.resolve (/home/hearen/git/repos/ng-hue-lib/node_modules/@angular-devkit/core/node/resolve.js:141:11)
    at Observable.rxjs_1.Observable [as _subscribe] (/home/hearen/git/repos/ng-hue-lib/node_modules/@angular-devkit/architect/src/architect-legacy.js:153:40)
    at Observable._trySubscribe (/home/hearen/git/repos/ng-hue-lib/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/home/hearen/git/repos/ng-hue-lib/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Observable.js:30:22)
    at /home/hearen/git/repos/ng-hue-lib/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Observable.js:99:19
    at new Promise (<anonymous>)
    at Observable.toPromise (/home/hearen/git/repos/ng-hue-lib/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Observable.js:97:16)
    at BuildCommand.initialize (/home/hearen/git/repos/ng-hue-lib/node_modules/@angular/cli/models/architect-command.js:67:96)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:279:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3)


Package                            Version
@angular-devkit/architect          0.13.8
@angular-devkit/build-angular      0.13.8
@angular-devkit/build-ng-packagr   <error>
@angular-devkit/build-optimizer    0.13.8
@angular-devkit/build-webpack      0.13.8
@angular-devkit/core               7.3.8
@angular-devkit/schematics         7.3.8
@angular/cdk                       7.3.7
@angular/cli                       7.3.8
@ngtools/json-schema               1.1.0
@ngtools/webpack                   7.3.8
@schematics/angular                7.3.8
@schematics/update                 0.13.8
ng-packagr                         5.0.1
rxjs                               6.4.0
typescript                         3.1.6
webpack                            4.29.0

require.resolve "Error: Cannot find module" even though package , resolve will not find the module startbootstrap-sb-admin-2 even though it was installed successfully and confirmed as existing in ./node_modules . It looks like you have recently installed monads-fd, perhaps as a dependency of something else you installed. Both monads-fd and mtl packages contain the module Control.Monad.Reader, so GHC doesn't know which one to use when you compile some code that imports it. You need to resolve the ambiguity somehow: If you are using GHC or GHCi directly

Solved: Cannot find module react : npm install, Solved: Cannot find module react : npm install. CodeDocu_com. Loading Unsubscribe Duration: 2:02 Posted: Oct 29, 2019 Repro steps npm -v > 5.6.0 npm install -g @angular/cli@1.6.5 ng new marketdata Observed behavior Could not find module "@schematics System Win x64 OS Windows 7

Cannot find module in node.js, What's issue Cannot find module Just Type command in terminal or command prompt npm Duration: 2:09 Posted: Oct 24, 2017 registers the component in a module (by default, in the app.module.ts) The problem is, that you don't have an app.module.ts. You renamed it to something else, or perhaps even have multiple of them. In that case there are 2 possible solutions: you do the registration of the component manually. (easiest) ng g component mycomponent --skip-import

Managing Packages with Npm, getting a log error from glitch regarding the express module which points to the server.js file: Package.json file looks like this: { “author”:  VC++ experimental modules does not work. Ask Question Asked 2 years, 6 months ago. Active 2 years, 6 months ago. could not find module ''