Open jmmobley opened 6 years ago
Not sure if this will help you, but I noticed that if I have Typescript 3.x.x installed globally and I install Typescript 2.8.x locally (npm i -S Typescript@2.8.0
) the compiler uses the local version instead of the global one. If you use vs-code you should see in the bottom right the Typescript version in use. Clicking on it opens a popup where you can choose which version to use. See the attached screenshots.
Hi,
When executing ionic build --prod I get the following error:
Error: The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.9.2 was found instead. at checkVersion (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@angular\compiler-cli\src\transformers\program.js:806:19) at new AngularCompilerProgram (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@angular\compiler-cli\src\transformers\program.js:109:13) at Object.createProgram (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@angular\compiler-cli\src\transformers\program.js:812:16) at Object.createProgram (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@angular\compiler-cli\src\ngtools_api2.js:36:26) at C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:210:40 at step (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23) at Object.next (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53) at fulfilled (C:\Development\CareHere\Portal\src\Client.Device\ClientApp\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58) at
Here is my environment info:
global packages:
local packages:
System:
Environment Variables:
Misc:
I am using Angular 6, and Typescript 2.9.2 as stated in the error. How can
This compiles just fine in dev mode and my app works perfectly, but fails anytime --prod is specified, including cordova builds.
How can I disable this check? Clearly it isn't necessary or dev shouldn't work.