question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot make a prod build using @​ionic/app-scripts 2.1.3

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
~~[ ] feature request~~ [new feature requests are not considered at this time]
[ ] support request/question

Current behavior

After building an Ionic 2 app (ionic-angular 3.6.0) using @​ionic/app-scripts 2.1.3, the vendor.js file throws an exception on app load:

Uncaught TypeError: Cannot read property 'a' of undefined
    at Object.<anonymous> (vendor.js:1)
    at e (vendor.js:1)
    at Object.<anonymous> (vendor.js:1)
    at e (vendor.js:1)
    at Object.415 (main.js:1)
    at e (vendor.js:1)
    at window.webpackJsonp (vendor.js:1)
    at main.js:1

The actual error is from the reference to v.a at the end of the line below:

p=a([Object(r.Component)({selector:"tag-input-dropdown",templateUrl:"./tag-input-dropdown.template.html"}),c(0,Object(r.Inject)(Object(r.forwardRef)(function(){return v.a}))),u("design:paramtypes",[v.a])],p);

Expected behavior

After a prod build, the Ionic 2 app loads without throwing an exception.

Minimal reproduction of the problem with instructions (if applicable)

  1. Create an Ionic 2 app using ionic-angular 3.6.0 and @​ionic/app-scripts 2.1.3.
  2. Include ngx-chips 1.5.0 with the necessary imports in the app’s @​NgModule.
  3. Build the app using ionic-app-scripts build --prod.
  4. Attempt to navigate to the app in a browser. Note the exception in vendor.js.

What is the motivation / use case for changing the behavior? (if applicable)

What do you use to build your app?. Please specify the version

@​ionic/app-scripts 2.1.3 ionic-app-scripts build --prod

Angular version:

4.2.0

ngx-chips version:

1.5.0

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

all

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Gbuompriscocommented, Aug 11, 2017

I’ll have a deeper look on Sunday

1reaction
jknisleycommented, Aug 9, 2017

The “fix” in the commit of my previous message seemed to work in practice, but unit tests sure didn’t like it. I tried using Injector instead (see https://github.com/jknisley/ngx-chips/commit/3f98d4db3159fbfefd2bd0d79d399d6aca8b7459) and looks like that works just as well and doesn’t break any tests.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I cant make a build with ionic --prod
i am trying to make a build with --prod but its not working . i can make build easily with --dev command. Here...
Read more >
Failing Production Build of Ionic-3 app - cordova
I am building an app using Ionic-3. I am using follwing command to build the app -. ionic cordova build android --prod.
Read more >
@ionic/app-scripts | Yarn - Package Manager
Ionic App Scripts. Helper scripts to get Ionic apps up and running quickly (minus the config overload). To get the latest @ionic/app-scripts ,...
Read more >
ionic/app-scripts
Scripts for Ionic Projects. Latest version: 3.2.4, last published: 3 years ago. Start using @ionic/app-scripts in your project by running ...
Read more >
CHANGELOG.md
([#1226](https://github.com/ionic-team/ionic-app-scripts/issues/1226)) ... by only using the webpack module concat plugin for prod builds, make sure you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found