Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: __webpack_require__.i(...) is not a function #4223

Closed
wethinkagile opened this issue Oct 10, 2017 · 14 comments
Closed

Uncaught TypeError: __webpack_require__.i(...) is not a function #4223

wethinkagile opened this issue Oct 10, 2017 · 14 comments

Comments

@wethinkagile
Copy link

Description of the Issue and Steps to Reproduce:

Uncaught TypeError: __webpack_require__.i(...) is not a function
    at Object.../../../../moment/src/lib/units/year.js (vendor.bundle.js:47527)
    at __webpack_require__ (inline.bundle.js:55)
    at Object.../../../../moment/src/lib/moment/get-set.js (vendor.bundle.js:44718)
    at __webpack_require__ (inline.bundle.js:55)
    at Object.../../../../moment/src/lib/units/month.js (vendor.bundle.js:46328)
    at __webpack_require__ (inline.bundle.js:55)
    at Object.../../../../moment/src/lib/locale/base-config.js (vendor.bundle.js:43484)
    at __webpack_require__ (inline.bundle.js:55)
    at Object.<anonymous> (vendor.bundle.js:43805)
    at Object.../../../../moment/src/lib/locale/locales.js (vendor.bundle.js:44010)

Please include the values of all variables used.

Environment:

Examples: Chrome 49 on OSX, Internet Explorer 10 on Windows 7, Node.JS 4.4.4 on Ubuntu 16.0.4

Latest Chrome on Mac
Angular 4 on Kubernetes Linux Cluster

Both the browser and the OS are important to us, particularly if you have an unsual environment like an IOT application.

Other information that may be helpful:

  • The time zone setting of the machine the code is running on
    UTC+2
  • The time and date at which the code was run
    Just now.
  • Other libraries in use (TypeScript, Immutable.js, etc)
    Typescript, Angular4, Angular-CLI

If you are reporting an issue, please run the following code in the environment you are using and include the output:

Logger of Browser

Ensure your issue is isolated to moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.

@joshjohn1984
Copy link

joshjohn1984 commented Oct 10, 2017

I spent the whole day before realizing this was the issue!

@wethinkagile
Copy link
Author

You resolved it?

@lpsantana
Copy link

@nottinhill do you solved the problem?

@joshjohn1984
Copy link

@nottinhill .. I just reverted back to my previous moment version

@lpsantana
Copy link

@joshjohn1984 what version did you change? the angular2-moment one or moment one?

@matthew-sutterlin
Copy link

Our team had the same issue after autoinstalling 1.19, fixed everything by uninstalling and specifically npm install moment@2.18

error was:
year.js:84 Uncaught TypeError: webpack_require.i(...) is not a function
at Object. (year.js:84)
at webpack_require (bootstrap 2097b80…:686)
at fn (bootstrap 2097b80…:105)
at Object.exports.__esModule (get-set.js:6)
at webpack_require (bootstrap 2097b80…:686)
at fn (bootstrap 2097b80…:105)
at Object. (month.js:1)
at webpack_require (bootstrap 2097b80…:686)
at fn (bootstrap 2097b80…:105)
at Object. (base-config.js:6)
(anonymous) @ year.js:84

@morrisonbrett
Copy link

I ended up getting past this by changing:

import * as moment from 'moment';

to:

import * as moment from 'moment/moment';

@wethinkagile
Copy link
Author

wethinkagile commented Oct 10, 2017

@morrisonbrett Would you need to do code changes then?
@matthew-sutterlin define autoinstalling 1.19.

@morrisonbrett
Copy link

Yes, I had to update the import statement in all usages of moment. You can also alias the package per: #4216 (comment)

@yashaswi-nayak
Copy link

I have been facing this issue since yesterday, my moment version is 2.18.1, no changes in moment version since beginning. I have no import moment statements, any suggestions?

@4apkis
Copy link

4apkis commented Oct 11, 2017

This happens because of corrupted 2.19 moment version.
In my project we use angular2-moment, which is linked to moment. See the version - it is not strictly defined.

  "dependencies": {
    "moment": "^2.16.0"
  },

Once moment got updated, our project got failed.
We had to explicitly add
"moment":"2.18.1"
to our package.json and the issue had gone.

@4apkis
Copy link

4apkis commented Oct 11, 2017

@Jerome-Joestar is this version defined in your package.json?
When you build the project and see the issue, you can see the actual sources in the browser. Does that file still say "2.18.1"?

@JeromeJoestar
Copy link

@4apkis Just checked and you are correct it bumped the version up to 2.19.0, setting it strictly to 2.18.1. Thanks!

@mattjohnsonpint
Copy link
Contributor

Dup #4216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants