Ionic3 build Error - upgrading from ionic2 to ioni3

Hi Team,

I am having a full fledge working project in ionic2 and now I want it to be ported to ionic3.

I get this error while I am trying to build my project -

//Errors which I got

Error: Cannot set property 'fixed' of undefined in undefined at line undefined, col undefined, pos undefined
Error: Cannot set property 'fixed' of undefined in undefined at line undefined, col undefined, pos undefined
    at BuildError.Error (native)
    at new BuildError (D:\app\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
    at taskReject (D:\app\node_modules\@ionic\app-scripts\dist\worker-process.js:36:22)
    at D:\app\node_modules\@ionic\app-scripts\dist\worker-process.js:14:13
    at process._tickCallback (internal/process/next_tick.js:103:7)



//This is my package.json : 
{
	"name": "sample",
	"author": "sample",
	"homepage": "sample",
	"private": true,
	"scripts": {
		"clean": "ionic-app-scripts clean",
		"build": "ionic-app-scripts build",
		"ionic:build": "ionic-app-scripts build",
		"ionic:serve": "ionic-app-scripts serve"
	},
	"dependencies": {
		"@angular/common": "4.1.3",
		"@angular/compiler": "4.1.3",
		"@angular/compiler-cli": "4.1.3",
		"@angular/core": "4.1.3",
		"@angular/forms": "4.1.3",
		"@angular/http": "4.1.3",
		"@angular/platform-browser": "4.1.3",
		"@angular/platform-browser-dynamic": "4.1.3",
		"@ionic-native/contacts": "3.12.1",
		"@ionic-native/core": "3.12.1",
		"@ionic-native/splash-screen": "3.12.1",
		"@ionic-native/status-bar": "3.12.1",
		"@ionic/storage": "2.0.1",
		"@types/google-maps": "^3.2.0",
		"aws-sdk": "2.27.0",
		"bootstrap": "^3.3.7",
		"ionic-angular": "3.4.0",
		"ionic-native": "2.9.0",
		"ionicons": "3.0.0",
		"moment": "^2.18.1",
		"rxjs": "5.4.0",
		"sw-toolbox": "3.6.0",
		"zone.js": "0.8.12"
	},
	"devDependencies": {
		"@ionic/app-scripts": "1.3.1",
		"typescript": "2.3.4"
	},
	"cordovaPlugins": [],
	"cordovaPlatforms": [],
	"description": "vms: An Ionic project"
}

Could you please help me out from this ?

Thanks in advance.

Cheers,
Anup

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

I have done the formatting.
Thanks.

1 Like

Did the project work before?
How did you try to update?

@Sujan12, It works perfectly fine in ionic2 and is also in playstore rightnow, but from past 3 days I am trying to update to ionic3 but I am stuck up with this error. Hence, I have not been able to run even once after the changes.
I tried to update according to this link

Have you also upgraded to the latest Ionic CLI ?

Post your ionic info in this project please.

Below is the info @Sujan12 & @richardshergold

Cordova CLI: 6.5.0
Ionic Framework Version: 3.4.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.5
Xcode version: Not installed

Update to app-scripts 1.3.7 and try it again.
BTW @types dependencies should only life on your dev-deps

I think you can upgrade safely to Ionic CLI v3: npm install -g ionic

@LoLStats,

I tried , but it did not work. :frowning:

You don’t need that any more. If your code still uses it, update to the new @ionic-native.

I did as per your instructions @Sujan12, now I am getting this error below. [19:11:30] build prod started ... [19:11:30] clean started ... [19:11:30] clean finished in 8 ms [19:11:30] copy started ... [19:11:30] ngc started ... [19:11:54] ngc finished in 23.80 s [19:11:54] preprocess started ... [19:11:54] deeplinks started ... [19:11:56] deeplinks finished in 1.94 s [19:11:56] optimization started ... [19:11:59] copy finished in 28.69 s [19:12:22] optimization finished in 25.84 s [19:12:22] preprocess finished in 27.78 s [19:12:22] webpack started ... [19:14:55] webpack finished in 153.16 s [19:14:55] sass started ... [19:14:55] uglifyjs started ... [19:15:01] sass finished in 6.56 s [19:15:01] cleancss started ... [WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date. Error: Cannot set property 'fixed' of undefined in undefined at line undefined, col undefined, pos undefined

I updated the @ionic-native plugin too before getting this output…

Thanks,
Anup

Give us your new ionic info output in the project.
Also run the same command that gives you the error with --verbose at the end.

Hi @Sujan12,

Glad to see your support, thanks.

This is my project’s ionic info

global packages:

    @ionic/cli-plugin-proxy : 1.3.1
    @ionic/cli-utils        : 1.4.0
    Cordova CLI             : 6.5.0
    Ionic CLI               : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.1.2 browser 4.1.0
    Ionic Framework                 : ionic-angular 3.4.0

System:

    Node       : v6.9.5
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 5.0.3

and I also did run the command with --verbose at the end and this is the output :

[DEBUG] Error: Cannot set property 'fixed' of undefined in undefined at line undefined,  col undefined, pos undefined  at BuildError.Error (native)  at new BuildError
		(D:\app\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
        at taskReject
        (D:\app\node_modules\@ionic\app-scripts\dist\worker-process.js:36:22)
        at
        D:\app\node_modules\@ionic\app-scripts\dist\worker-process.js:14:13  at process._tickCallback (internal/process/next_tick.js:103:7)

Cheers,
Anup

Ah, now we got it: Ionic (or better app-scripts) is not yet ready for npm5 really.

If you ionic start blank blank a new project for example you would get an error about node-sass something. Downgrade your npm (possibly by downgrading node, best use nvm-windows so you can switch between node version effortlessly in the future) and try again.

Hi @Sujan12,

I did the changes as per your comments.
I have also installed nvm-windows which is of a great help.

When i tried to run the project after downgrading the npm i got this error :

PS D:\app> ionic cordova run android --prod --verbose
ERR: Your Node.js version is v5.0.0. Please update to the latest Node 6 LTS version (or latest Node).

I am really stuck up now.

The recommended Node 6 LTS (currently v6.11.0) has npm 3.10.10 which should work fine.

Yes i did make the required changes but still the error persists.

This is my ionic info for now :

global packages:

    @ionic/cli-plugin-proxy : 1.3.1
    @ionic/cli-utils        : 1.4.0
    Cordova CLI             : 6.5.0
    Ionic CLI               : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.1.2 browser 4.1.0
    Ionic Framework                 : ionic-angular 3.4.0

System:

    Node       : v6.11.0
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 5.0.3

and this is the error again :

      date.
[DEBUG] !!! ERROR ENCOUNTERED !!!
Error: Cannot set property 'fixed' of undefined in undefined at line undefined, col undefined, pos undefined
[DEBUG] Error: Cannot set property 'fixed' of undefined in undefined at line undefined, col undefined, pos undefined
       at BuildError.Error (native)
       at new BuildError
       (D:\app\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
       at taskReject
       (D:\app\node_modules\@ionic\app-scripts\dist\worker-process.js:36:22)
       at
       D:\app\node_modules\@ionic\app-scripts\dist\worker-process.js:14:13
       at process._tickCallback (internal/process/next_tick.js:109:7)
   	```

You are still on npm5. New installs of node 6.11.0 include npm 3.10.10: Download | Node.js

Latest LTS Version: v6.11.0 (includes npm 3.10.10)