简体   繁体   中英

throw new Error('Could not find local “typescript” package.')

I am getting this error when I upgraded angular from version 5.2 to 11. I have typescript installed in the package.json file. But when i run the app, I keep getting the error:throw new Error('Could not find local "typescript" package.')

I have also referred to the below issue but that did not help me.

Could not find local "typescript" package.The "@ngtools/webpack" package Angular 2

The solution was to create a new project to upgrade the app. just copied the source file and the then upgraded the dependencies. also changed the code in the components where ever needed. i was able to upgrade my app successfully.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM