Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

OpaqueToken error in vendor.js

$
0
0

@wterrill wrote:

I’ve been trying to update a program from ionic 2.0.1 to ionic 3 (angular 5) and I’m running into something that I’ve had little luck finding online.

Basically, when I run ‘ionic serve’ I get the following error -
WEBPACK_IMPORTED_MODULE_0__angular_core.OpaqueToken is not a constructor

and it’s coming from vendor.js (which is added to the project in the index.html file)

I did see from the angular upgrade site that all OpaqueTokens should be replaced by InjectTokens, and I tried to do directly in vendor.js… but it seems that vendor.js is created during ionic serve, so all of the changes I made are overwritten.

After reading a bunch about webpack, I imagine that the problem is that I have an import of Angular core somewhere that shouldn’t be there… but I’m unsure of what to search for. (especially because I have “@angular/core”: “5.0.1”, in my package.json file. I’m just not sure what to get rid of.

Here’s the rest of my package.json file… if it helps:

{
“name”: “neighborly_test”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “5.0.1”,
"@angular/compiler": “5.0.1”,
"@angular/compiler-cli": “5.0.1”,
"@angular/core": “5.0.1”,
"@angular/forms": “5.0.1”,
"@angular/http": “5.0.1”,
"@angular/platform-browser": “5.0.1”,
"@angular/platform-browser-dynamic": “5.0.1”,
"@ionic-native/app-version": “^4.4.0”,
"@ionic-native/badge": “^4.4.0”,
"@ionic-native/core": “4.4.0”,
"@ionic-native/splash-screen": “4.4.0”,
"@ionic-native/status-bar": “4.4.0”,
"@ionic/storage": “2.1.3”,
“angularfire2”: “^2.0.0-beta.8”,
“gsap”: “^1.19.1”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“moment”: “^2.18.1”,
“rxjs”: “5.5.2”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.18”
},
“devDependencies”: {
"@ionic/app-scripts": “3.1.2”,
“typescript”: “2.4.2”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-app-version”: {},
“cordova-plugin-badge”: {}
}
}
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>