Build Error upgraded from 3.7.1 to 3.8.0

I’m getting this error when trying to build:

Error: Metadata version mismatch for module /… /node_modules/@ionic/storage/dist/src/storage.d.ts, found version 4, expected 3

Any ideas on how to fix. I deleted the node_modules folder and ran npm install. No luck.

1 Like

Hmm, did you update anything else in your app?

ionic-angular 3.8.0 didn’t include any major updates to dependencies, so not sure where that could have come from.

I followed the upgrade instructions. I may have messed something up after I set all the angular stuff to 4.4.4 i ran npm update

I was using storage v 2.0.1, after npm update it went to 2.1.1. I tried to downgrade back to 2.0.1 with no luck.

getting save error but only when using “–prod” flag otherwise works fine… any solutions??

what is that specific error

We have the same issue, but didn’t upgrade, we are still on version 3.7.1

Locally, we don’t have the problem, but if I check out the whole repository in a different folder (or use our bamboo build server), we cannot build and/or run the app with the same error message.

Error: Metadata version mismatch for module /… /node_modules/@ionic/storage/dist/src/storage.d.ts, found version 4, expected 3

The cause seems to be the new ionic-storage release 2.1.1 from 2.11.2017:
https://www.npmjs.com/package/@ionic/storage

We could fix the error by setting the version to 2.0.1 in package.json:

"@ionic/storage": "~2.0.1",

my problem is solved after installing storage@2.0.1 using

npm install --save @ionic/storage@2.0.1

I started getting this error too for some ionic native packages. I was able to solve it by matching the erroring package version with ionic-angular version.