ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 303 forks source link

DeepLinkConfigToken did not return valid data #1106

Open jetav8r opened 7 years ago

jetav8r commented 7 years ago

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/

Short description of the problem:

when running the production build, it exits at deeplinks...

What behavior are you expecting?

To be able to build a production release

Steps to reproduce: 1.run ionic cordova build browser --prod --verbose 2. 3.

insert any relevant code between the above and below backticks

Which @ionic/app-scripts version are you using? I've tried several versions...right now I'm using versions of devDependencies below:

"devDependencies": {
    "@ionic/app-scripts": "^2.0.1-201707121621",
    "@ionic/cli-plugin-cordova": "1.5.0-alpha.18371e18",
    "@ionic/cli-plugin-ionic-angular": "1.4.0-alpha.18371e18",
    "typescript": "2.3.4"
  },

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Here's the console output after running the build command:

[16:21:50] build prod started ... [16:21:50] clean started ... [16:21:50] clean finished in less than 1 ms [16:21:50] copy started ... [16:21:50] ngc started ... [16:21:59] ngc finished in 9.48 s [16:22:00] preprocess started ... [16:22:00] deeplinks started ... [WARN] Error occurred during command execution from a CLI plugin (ionic/cli-plugin-cordova). [DEBUG] !!! ERROR ENCOUNTERED !!! Error: The RegExp to find the DeepLinkConfigToken did not return valid data [DEBUG] Error: The RegExp to find the DeepLinkConfigToken did not return valid data at new BuildError (C:\Users\me\WebstormProjects\app\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28) at C:\Users\me\WebstormProjects\app\node_modules\@ionic\app-scripts\dist\preprocess.js:18:21

danbucholtz commented 7 years ago

@jetav8r,

What Angular version are you running?

Thanks, Dan

jetav8r commented 7 years ago

4.1.3... I was able to get it to work by downgrading from angular 4.2 Didn't realize I had to remove the ^ symbol in the package.json file in order for it to force the downgrade back to 4.1.3 It's working now that angular is back to 4.1.3

Thanks for the email!

Wayne

On Thu, Jul 13, 2017 at 7:42 PM, Dan Bucholtz notifications@github.com wrote:

@jetav8r https://github.com/jetav8r,

What Angular version are you running?

Thanks, Dan

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ionic-team/ionic-app-scripts/issues/1106#issuecomment-315254470, or mute the thread https://github.com/notifications/unsubscribe-auth/AHmXxVF69xSgvQe-ahbZvVWJnMDNdkuiks5sNtWQgaJpZM4OWVPN .

danbucholtz commented 7 years ago

@jetav8r,

Yep, Angular 4.2 changed something in the ng factory files. We'll need to upgrade to match them.

Thanks, Dan

antoineol commented 7 years ago

I'm also having this issue, and it seems some browsers have issues with animations below Angular 4.2 (like https://github.com/angular/material2/issues/5019, https://github.com/angular/angular/issues/14007 and I'm also having a Partial keyframes are not supported I cannot explain on an older browser). Supporting Angular 4.2+ would be great to limit the risk of issues with things like animations.

Any update so far about this issue?

Thanks!

EDIT: I just noted it might be a duplicate of https://github.com/ionic-team/ionic-app-scripts/issues/1006 and https://github.com/ionic-team/ionic-app-scripts/issues/1070.

dev-manager-uk commented 7 years ago

@danbucholtz We are getting this issue too. Any eta on a fix? Thanks!

cmartin81 commented 7 years ago

I had a look inside the sourcecode. And the appNgModuleFactoryFileContent has changed. It cannot find any matches on the regex /this.?DeepLinkConfigToken.?=([\s\S]*?);/g This only happens when you run it with the --aot or --prod option

Are there any eta on a fix?

soumak77 commented 7 years ago

@danbucholtz has the Ionic team run into this issue yet now that ionic-angular uses angular 4.3.6? I'm running the latest ionic-angular build and I'm hitting this issue now that angular has been upgraded.

soumak77 commented 7 years ago

@danbucholtz seems like this issue is resolved. I just tested with @ionic/app-scripts@nightly and the production build succeeded!

pedrohills commented 7 years ago

npm install @ionic/app-scripts@nightly --save-dev worked for me.

menorval commented 6 years ago

Thanks @pedrohills, it also worked for me.