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.

Module not found: Error: Can't resolve './locale' in '[app path]\node_modules\moment\src\lib\locale'

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

ng - 1.3.0 node - 6.11.0 npm - 3.10.10 Windows 10

Repro steps.

Unable to repro locally, only in CI environment (see details below)

The log given by the failure.

Module not found: Error: Can’t resolve ‘./locale’ in ‘[app path]\node_modules\moment\src\lib\locale’

Mention any other details that might be useful.

We just started to get this error in our CI environment last night, unable to repro locally even with --prod or --aot options when building. Seems to be related to this issue: https://github.com/moment/moment/issues/2979 although trying the suggested fix there has not helped

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
v1ascommented, Oct 11, 2017

I was helped by the version change to previous by command npm i moment@2.18.1 --save And don’t forget to restart application if “ng serve”

2reactions
danwellmancommented, Oct 11, 2017

@ssanderlin, sorry for the delay, yes, we fixed this in the end. Rolling back to moment@2.18.0 was the fix after all

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 - Stack Overflow
Compiler warning "Module not found: Error: Can't resolve './locale'" since I use momentjs in my react app [duplicate].
Read more >
Issues - GitHub
Output some errors on console. WARNING in ./node_modules/moment/src/lib/locale/locales.js Module not found: Error: Can't resolve '.
Read more >
Module not found: Can't resolve 'moment' error | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'moment'", make sure to install the moment package by opening your terminal in...
Read more >
Search - appsloveworld.com
Coding example for the question Compiler warning "Module not found: Error: Can't resolve './locale'" since I use momentjs in my react app-Reactjs.
Read more >
moment/moment - Gitter
Hello Everyone I've a problem with Angular and MomentJS : WARNING in ./~/moment/src/lib/locale/locales.js. Module not found: Error: Can't resolve '.
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