Coder Social home page Coder Social logo

Comments (17)

Maxwin-z avatar Maxwin-z commented on September 18, 2024 2

When I use yarn, this error occurs. delete node_modules and npm install solve the problem.

from react-daterange-picker.

moimikey avatar moimikey commented on September 18, 2024 1

pedestrian question... BUT.... do you have moment and moment-range imported

from react-daterange-picker.

AlanFoster avatar AlanFoster commented on September 18, 2024 1

Also ensuring that your babel loader isn't accidentally being run over third party dependencies would be a good sanity check too

from react-daterange-picker.

butsjoh avatar butsjoh commented on September 18, 2024 1

For anyone still landing on this. It was fixed for us if you properly extend moment with moment range (see moment range docs)

import Moment from 'moment'
import { extendMoment } from 'moment-range'

const moment = extendMoment(Moment);

from react-daterange-picker.

dphaener avatar dphaener commented on September 18, 2024

👍 Me too

from react-daterange-picker.

AlanFoster avatar AlanFoster commented on September 18, 2024

@nickbrit Are you still facing this issue?

from react-daterange-picker.

rynonl avatar rynonl commented on September 18, 2024

I am seeing this as of today. Any updates?

from react-daterange-picker.

timaschew avatar timaschew commented on September 18, 2024

Have the same issue when using the module from npm.
But if I used the source from github it seems to work.
Also find out it's not suitable if you want only a single picker.
So I switched now to https://hacker0x01.github.io/react-datepicker/ it works perfect with redux-form

from react-daterange-picker.

szubtsovskiy avatar szubtsovskiy commented on September 18, 2024

I get the similar problem in my CI environment but not when I am running the app locally. In both cases I use production build of JS bundle. It is obfuscated (thanks UglifyJS), so the message is a little bit different but after investigation it becomes obvious that I've run into the same issue.

It looks like this statement:

require('moment-range');

which comes after this one:

var _moment2 = _interopRequireDefault(_moment);

does not actually change the _moment2["default"] instance in some circumstances.

My CI environment is Codeship (Ubuntu) and this error is 100% reproduced there when I am running my integration tests. Both when app is deployed locally (OS X) and on production (a droplet on DigitalOcean with Ubuntu) there is no problem.

Apparently there is no dependency on Node or NPM. I tried different versions and got the same result.

I suspect that there is some difference in JS engines which are used in Chrome and Firefox on different operating systems. I get similar symptoms in both browsers. My conclusion is that Chrome/Firefox process JS code generated by Webpack differently under different operating systems. It explains all symptoms but does not unfortunately give a clue how to fix it. :-(

Any ideas someone? Except for switching to another plug-in?

from react-daterange-picker.

szubtsovskiy avatar szubtsovskiy commented on September 18, 2024

I have just tested it. Apparently it depends on the operating system but not the way I thought.

When bundle is generated under OS X it works even when the app is viewed in Chrome under Ubuntu (at least my integration test passed successfully). When bundle is generated under Ubuntu (in my setup) I get the error mentioned in the issue.

It looks like an issue in Webpack rather than in moment-range.

from react-daterange-picker.

szubtsovskiy avatar szubtsovskiy commented on September 18, 2024

Well, using a fresh install definitely helps. Dependency cache was my enemy, now the problem is gone completely.

from react-daterange-picker.

yrik avatar yrik commented on September 18, 2024

hm... have the same issue on ubuntu, on mac os it's ok.

from react-daterange-picker.

AlanFoster avatar AlanFoster commented on September 18, 2024

@yrik if you are still having issues, would you mind specifying what version of moment range you have in your mac and Ubuntu installs

from react-daterange-picker.

SimeonC avatar SimeonC commented on September 18, 2024

I just had this issue and it ended being resolved when I deleted node_modules, npm cache clear and npm install. Then there are no issues for some odd reason...

from react-daterange-picker.

kukuruznik avatar kukuruznik commented on September 18, 2024

I don't use react-daterange-picker but ran into this same issue (symptoms exactly as described by @szubtsovskiy). Reinstalling the dependencies (as described above) and rebundling helped.

from react-daterange-picker.

Plazmaz avatar Plazmaz commented on September 18, 2024

Still having this issue, none of the above fixes are working for me.

from react-daterange-picker.

AlanFoster avatar AlanFoster commented on September 18, 2024

This should be fixed now by the latest version, please open a new issue if this is still happening after upgrading 👍

from react-daterange-picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.