Ionic3 build Error - upgrading from ionic2 to ioni3

I did update it too. Still the same.

[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of
       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)

PS D:\app> 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.11.0
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 3.10.10

Delete node_modules and run npm install now.

Appreciate your patience, but again I am failing with npm install now.

PS D:\app> npm install
Error: Cannot find module 'safe-buffer'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\Deep\AppData\Roaming\npm\node_modules\npm\node_modules\request\lib\helpers.js:5:36)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Deep\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code MODULE_NOT_FOUND

npm ERR! Cannot find module 'safe-buffer'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

Ok, that means that your npm install is broken I think. npm install -g maybe (don’t know if this exists) or reinstall node/npm again. Something is broken there. (See e.g. https://github.com/npm/npm/issues/16905)

Yes I was able to fix that npm issue, now I tried building the project and faced the same issue again.

[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of
       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)

Anything else which I need to do please let me know. I can start fresh if you want me to, with the current project in ionic2 to port to ionic3.

Thanks for your support.

What command exactly are you executing right now?

Please create a new blank project with ionic start blank blank and execute the same command there. Do you get the same error?

@Sujan12, I am using ionic cordova run android --prod --verbose

as you said the new project with ionic start blank blank is working fine with the commands you mentioned and in the current system environment.

Ok, I am officially out of ideas. Something is breaking the build for your project, but I have no idea what it is and how you could debug this further.

  1. ionic cordova run android --verbose works without problems, correct?
  2. The only remaining hint is the almost useless error message: Search for “fixed” in your code, comment that stuff out, try again.

Well, ok, even I tried to remove “fixed” keyword , but ended with same result.

My request to you would be, please let me know if there is any official link which says how to port ionic2 projects to ionic3. So that i can follow step by step process and build the app. I will try to start fresh and re-do flow again.

Nothing “official”, but here is a topic that includes the relevant bits: Guide: How to update to Ionic 3.X

Sure, I will work on this and let you know.

1 Like