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.

ng build --prod, Angular and Bootstrap, got i.pause is not a function

See original GitHub issue

I do not know whether it belongs to either Angular or Bootstrap folks.

https://github.com/twbs/bootstrap/issues/25297

I’m submitting a…


[x] Bug report  

Current behavior

a.)

  1. ng build --prod
  2. built success
  3. got the following error msg when I open the deployed source on the server: “Uncaught TypeError: i.pause is polyfills.53de1bdf0af2f1f9ce6f.bundle.js:1 not a function at HTMLDivElement.<anonymous> (scripts.aedec6ce60985a2f5804.bundle.js:1) at Function.each (scripts.aedec6ce60985a2f5804.bundle.js:1) at v.fn.init.each (scripts.aedec6ce60985a2f5804.bundle.js:1) at v.fn.init.e._jQueryInterface [as carousel] (scripts.aedec6ce60985a2f5804.bundle.js:1) at HTMLDivElement.<anonymous> (scripts.aedec6ce60985a2f5804.bundle.js:1) at Function.each (scripts.aedec6ce60985a2f5804.bundle.js:1) at v.fn.init.each (scripts.aedec6ce60985a2f5804.bundle.js:1) at scripts.aedec6ce60985a2f5804.bundle.js:1 at dispatch (scripts.aedec6ce60985a2f5804.bundle.js:1) at m.handle (scripts.aedec6ce60985a2f5804.bundle.js:1)”

Bootstrap v4.beta.2 carousel does not work, when I try to click on next slide, got the fallowing:

Uncaught Error: No method named “next” polyfills.53de1bdf0af2f1f9ce6f.bundle.js:1 at HTMLDivElement.<anonymous> (scripts.aedec6ce60985a2f5804.bundle.js:1) at Function.each (scripts.aedec6ce60985a2f5804.bundle.js:1) at v.fn.init.each (scripts.aedec6ce60985a2f5804.bundle.js:1) at v.fn.init.e._jQueryInterface [as carousel] (scripts.aedec6ce60985a2f5804.bundle.js:1) at HTMLAnchorElement.e._dataApiClickHandler (scripts.aedec6ce60985a2f5804.bundle.js:1) at HTMLDocument.dispatch (scripts.aedec6ce60985a2f5804.bundle.js:1) at HTMLDocument.m.handle (scripts.aedec6ce60985a2f5804.bundle.js:1) at e.invokeTask (polyfills.53de1bdf0af2f1f9ce6f.bundle.js:1) at n.runTask (polyfills.53de1bdf0af2f1f9ce6f.bundle.js:1) at t.invokeTask [as invoke] (polyfills.53de1bdf0af2f1f9ce6f.bundle.js:1)

b.)

  1. ng serve -> there is no any error msg, when I open localhost:4200

c.)

  1. replace ../node_modules/bootstrap/dist/js/bootstrap.min.js to ../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js in .angular-cli.json
  2. ng build --prod -> everything works fine

Expected behavior

Should not get any error msg.

Minimal reproduction of the problem with instructions

I will not intend to create a Plunker, so much time! But I can give access to my private repository, if you need…

Environment



      "scripts": [
        "../node_modules/jquery/dist/jquery.min.js",
        "../node_modules/popper.js/dist/umd/popper.min.js",
        "../node_modules/bootstrap/dist/js/bootstrap.min.js"
      ],

{
  "name": "...",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "@ngx-translate/core": "^9.0.2",
    "@ngx-translate/http-loader": "^2.0.1",
    "@vimeo/player": "^2.2.1",
    "bootstrap": "4.0.0-beta.2",
    "core-js": "^2.5.3",
    "font-awesome": "^4.7.0",
    "jquery": "^3.2.1",
    "ngx-facebook": "^2.4.0",
    "popper.js": "^1.12.9",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.20"
  },
  "devDependencies": {
    "@angular/cli": "1.6.4",
    "@angular/compiler-cli": "^5.2.0",
    "@angular/language-service": "^5.2.0",
    "@types/jasmine": "~2.8.4",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~9.3.0",
    "codelyzer": "^4.0.2",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.3.3",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.2.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "2.5.3"
  }
}

Browser: Chrome v63.0.3239.132 (official version) (64 bits)

For Tooling issues:

  • Node version: v8.9.1
  • Npm version: 5.5.1
  • Platform: Windows Pro 10 latest

Others:

  • IDE: IntelliJ Idea Ultimate 2017.3.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
mlc-mlapiscommented, Jan 15, 2018

@woteska … that’s simply not true … if you don’t prepare a simple form of reproduction (Stackblitz, Plunker, …) it means that anybody has to spend many times more time even on understanding where exactly the problem is. If you multiply the number of people and the number of issues you can see why a simple reproduction is so important …

Preparing a simple reproduction also means that in many cases the problem disappear because its author finds out the problem or finds out that it is not related to Angular at all.

3reactions
woteskacommented, Jan 14, 2018

@trotyl, @jotatoledo, @ericmartinezr , I accept that there is no reproduction like on Plunker, but I offered that I could provide access to my repository. It should not be so much effort for anyone, it is just a clone and npm install, that’s it!

Where do I have to know from which problem is Angular related one and which not? Sorry guys, I am also a developer and we also use Git, but if somebody ask me something I never downvote them for a question so I can’t comprehend why someone should be an ass because of I got a problem… I suppose so you guys are all Angular folks, I think so it is not a good introduction for a user who uses your product.

Of course you have the right to vote down me personally, but there is no mean, there is not matter, the world is not a better place voting me down…

I seriously have to suppose that you are all bored guys, your job is boring. 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to call pause() function of NgbCarousel on ngOnInit in ...
i added ngb-carousel #carousel i html and @ViewChild('carousel') carousel: NgbCarousel in my component file but pause is not working · there is ...
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
Sheer size of the AngularJS can easily lead to many mistakes. In this article you will learn about most common AngularJS developer mistakes...
Read more >
ng build - Angular
Option Description Value Type Default Value ‑‑aot Build using Ahead of Time compilation. boolean true ‑‑base‑href Base url for the application being built. string ‑‑delete‑output‑path Delete...
Read more >
Angular directives for Bootstrap - AngularUI
Build files for all directives are distributed in several flavours: minified for production usage, un-minified for development, with or without templates.
Read more >
Carousel - Bootstrap
Lastly, if you're building our JavaScript from source, it requires util.js . Example. Carousels don't automatically normalize slide dimensions. As such, you may ......
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