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

Created on 11 Oct 2017  路  5Comments  路  Source: angular/angular-cli

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_modulesmomentsrcliblocale'

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

Most helpful comment

I was helped by the version change to previous by command
npm i [email protected] --save
And don't forget to restart application if "ng serve"

All 5 comments

@danwellman Did you fix this? I'm having the same issue.

I was helped by the version change to previous by command
npm i [email protected] --save
And don't forget to restart application if "ng serve"

@ssanderlin, sorry for the delay, yes, we fixed this in the end. Rolling back to [email protected] was the fix after all

Thanks guys. this fixed my problem as well. quick catch !

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sysmat picture sysmat  路  3Comments

hartjo picture hartjo  路  3Comments

NCC1701M picture NCC1701M  路  3Comments

5amfung picture 5amfung  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments