I'm migrating angular application from 5 to 6. Run
ng update @angular/cli
and ng update @angular/core
But now if i run ng build
, i get this error
Cannot find module 'typescript' from 'C:\..\App'
Error: Cannot find module 'typescript' from 'C:\..\App'
at Function.module.exports [as sync] (C:\..\App\MyApp\node_modules\resolve\lib\sync.js:42:15)
at resolveProjectModule (C:\..\App\MyApp\node_modules\@angular-devkit\build-angular\src\angular-cli-files\utilities\require-project-module.js:15:20)
at Object.requireProjectModule (C:\..\App\MyApp\node_modules\@angular-devkit\build-angular\src\angular-cli-files\utilities\require-project-module.js:20:20)
at BrowserBuilder.buildWebpackConfig (C:\..\App\MyApp\node_modules\@angular-devkit\build-angular\src\browser\index.js:103:52)
at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\..\App\MyApp\node_modules\@angular-devkit\build-angular\src\browser\index.js:35:38)
at Observable._trySubscribe (C:\..\App\MyApp\node_modules\rxjs\internal\Observable.js:43:25)
at Observable.subscribe (C:\..\App\MyApp\node_modules\rxjs\internal\Observable.js:29:22)
at C:\..\App\MyApp\node_modules\rxjs\internal\util\subscribeTo.js:22:31
at Object.subscribeToResult (C:\..\App\MyApp\node_modules\rxjs\internal\util\subscribeToResult.js:7:45)
at MergeMapSubscriber._innerSub (C:\..\App\MyApp\node_modules\rxjs\internal\operators\mergeMap.js:75:38)
at MergeMapSubscriber._tryNext (C:\..\App\MyApp\node_modules\rxjs\internal\operators\mergeMap.js:72:14)
at MergeMapSubscriber._next (C:\..\App\MyApp\node_modules\rxjs\internal\operators\mergeMap.js:55:18)
at MergeMapSubscriber.Subscriber.next (C:\..\App\MyApp\node_modules\rxjs\internal\Subscriber.js:64:18)
at TapSubscriber._next (C:\..\App\MyApp\node_modules\rxjs\internal\operators\tap.js:62:26)
at TapSubscriber.Subscriber.next (C:\..\App\MyApp\node_modules\rxjs\internal\Subscriber.js:64:18)
at MergeMapSubscriber.notifyNext (C:\..\App\MyApp\node_modules\rxjs\internal\operators\mergeMap.js:84:26)
package.json includes"typescript": ">=2.7.0 <2.8.0"
in devDependencies
Cleaned npm cache and reinstalled all packages but it didn't help.
Anybody with same issues?
Reinstall typescript cleanly
- npm uninstall -g typescript
- npm uninstall typescript
- npm install -g typescript
- npm install [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With