Ionic 3: Build in “prod” mode: Cannot find module “.”
I found the problem. In my package.json I was using:
"typescript": "^2.9.1",
Decreasing the version to ~2.6.2
fixed it for me.
Removing ^
from @ionic/app-scripts
and typescript
works for me as follows:
"devDependencies": {
"@ionic/app-scripts": "3.1.9",
"typescript": "2.8.3"
}
I had a similar problem, but the wrong typescript
package was getting pulled in from a combination of other dependent projects as well as VS Code. I resolved it by pinning the exact version (no ^
or ~
) of @ionic/app-scripts
and typescript
to what I needed.
"devDependencies": {
"@ionic/app-scripts": "3.1.9",
"typescript": "2.6.2"
}