-
Notifications
You must be signed in to change notification settings - Fork 12k
Can't get Globalize to work inside an Angular CLI project #7949
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
Comments
@filipesilva I know we have a few guides regarding 3rd party libraries, do you have any idea how to integrate this one? |
I have the same behaviour. I also believe it is related #7341 and CommonJS module resolution. |
Any progress here? |
I have the same problem, is there a temporary solution? |
Same issue. Any recommendation? |
Still really need this... |
Would also need a fix for this |
+1 |
important fix, we need... thanks! |
Same issue here, if u know how to fix it, please tell us!! |
Same issue |
i have the same problem, how can i fix? |
have same problem at version 1.7.0 |
This issue is fixed in Angular CLI 6. I can add the following to the "paths": {
"globalize": [
"node_modules/globalize/dist/globalize"
],
"globalize/*": [
"node_modules/globalize/dist/globalize/*"
],
"cldr": [
"node_modules/cldrjs/dist/cldr"
],
"cldr/*": [
"node_modules/cldrjs/dist/cldr/*"
]
} If this is the recommended way to do this, I believe we can close this issue. |
sorry, now work i wrong the path |
I have set the globalize and cldr paths, but now I'm still getting "Module not found: Error: Can't resolve '...node_module\globalize\dist\globalize' in '...node_modules@devexpress\analytics-core'" This is also happening for "globalize\dist\globalize" in "devextreme\localization\globalize." There are other errors that look similar to this but I did not want to type it all out or copy/paste path info. |
@GoshaFighten glad to hear it's working again for your usecase. @andrewstockt @mayank-ongraph are you still having this problem? Can you setup a reproduction please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via |
I've this problem: app.module.ts:17 Uncaught TypeError: globalize__WEBPACK_IMPORTED_MODULE_8___default.a.loadMessages is not a function
at Module../src/app/app.module.ts (app.module.ts:17)
at __webpack_require__ (bootstrap:78)
at Module../src/main.ts (main.ts:1)
at __webpack_require__ (bootstrap:78)
at Object.0 (main.ts:12)
at __webpack_require__ (bootstrap:78)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.js:1 See repro at: |
@StefH that's a different error than the one originally shown in this issue. That runtime error says that the In your repro I changed the import to |
Closing as inactive. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.4.4
node: 8.1.4
os: win32 x64
@angular/animations: 4.4.4
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.4.4
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.3.4
Repro steps.
I wish to localize and format dates in my application using Globalize. For this, I installed it using
Globalize has the
cldrjs
library as a dependency, but require it ascldr
. So, in thetsconfig.json
file, I've added thecompilerOptions.paths
section asBut, building my application, I get the following error.
The log given by the failure.
Desired functionality.
I see that you supported this functionality in the #2470 PR. And, I see that this worked in
@angular/cli
of version 1.2.1. I also see the #7341 issue that makes me think that you had a regression in this regard, but it was fixed. I use the latest@angular/cli
version. But, I still can't get it to work. Yes, I can callng eject
and manually specifyalias
for Webpack. But, how can I deal with it without this?Mention any other details that might be useful.
My project: https://github.com/GoshaFighten/NGGlobalize
The text was updated successfully, but these errors were encountered: