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.

Problems with moment 2.19.0

See original GitHub issue

Description of the Issue and Steps to Reproduce:

Did you search for duplicate issue? yes Today was the relase of moment 2.19.0. There are some build issues with this angular2-moment and moment 2.19.0. The output is:

Module not found: Error: Can't resolve './locale' in 'C:\angular-app\node_modules\angular2-moment\node_modules\moment\src\lib\locale'
resolve './locale' in 'C:\angular-app\node_modules\angular2-moment\node_modules\moment\src\lib\locale'
  using description file: C:\angular-app\node_modules\angular2-moment\node_modules\moment\package.json (relative path: ./src/lib/locale)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\angular-app\node_modules\angular2-moment\node_modules\moment\package.json (relative path: ./src/lib/locale)
    using description file: C:\angular-app\node_modules\angular2-moment\node_modules\moment\package.json (relative path: ./src/lib/locale/locale)
      as directory
        C:\angular-app\node_modules\angular2-moment\node_modules\moment\src\lib\locale\locale doesn't exist
[C:\angular-app\node_modules\angular2-moment\node_modules\moment\src\lib\locale\locale]
 @ ./node_modules/angular2-moment/node_modules/moment/src/lib/locale/locales.js 65:16-60
 @ ./node_modules/angular2-moment/node_modules/moment/src/lib/locale/locale.js
 @ ./node_modules/angular2-moment/node_modules/moment/src/moment.js
 @ ./node_modules/angular2-moment/locale.pipe.js
 @ ./node_modules/angular2-moment/index.js
 @ ./src/app/master-data/master-data.module.ts
 @ ./src/$$_gendir lazy
 @ ./node_modules/@angular/core/@angular/core.es5.js
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

Please answer the following questions:

  • Angular version? 4.4.4
  • moment version? 2.19.0
  • Are you using moment-timezone? no
  • Are you using the angular-cli? yes

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:6

github_iconTop GitHub Comments

2reactions
lotoadcommented, Oct 11, 2017

add: "resolutions": { "moment": "2.18.1" } To your package.json and then install angular2-moment.

1reaction
lonwicommented, Oct 12, 2017

It works fine with latest moment 2.19.1 just in case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Moment.js 2.19.0 - NuGet
Version Downloads Last updated 2.29.4 163,739 6 months ago 2.29.3 114,982 8 months ago 2.29.2 38,090 9 months ago
Read more >
Momentjs : Security vulnerabilities - CVE Details
# CVE ID CWE ID Vulnerability Type(s) Publish Date Update Date Score Gaine... 1 CVE‑2022‑31129 400 2022‑07‑06 2022‑10‑27 5.0 None 2 CVE‑2022‑24785 22 Dir. Trav....
Read more >
moment | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Moment.js documentation - DevDocs
The Moment team has discussed these issues at length. We recognize that many existing ... Before 2.19.0 it was invalidating the moment in...
Read more >
GHSA-8hfj-j24r-96c4 - Open Source Insights
js, especially if user provided locale string, eg `fr` is directly used to switch moment locale. ### Patches This problem is patched in...
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