urish / ngx-moment

moment.js pipes for Angular
MIT License
1.17k stars 154 forks source link

Errors since update to latest version (6.0.0) #272

Closed mhosman closed 2 years ago

mhosman commented 2 years ago

And so on....

ct5845 commented 2 years ago

Similiar issues

Error: Symbol TimeAgoPipe declared in $/node_modules/ngx-moment/time-ago.pipe.d.ts is not exported from ngx-moment/moment.module

CynanX commented 2 years ago

I've the same..

ct5845 commented 2 years ago

Might be irrelevant, but when trying to build the master branch i'm getting this error;

Building Angular Package

------------------------------------------------------------------------------
Building entry point 'ngx-moment'
------------------------------------------------------------------------------
× Compiling with Angular sources in Ivy partial compilation mode.
node_modules/@types/eslint/index.d.ts:450:42 - error TS2724: '"C:/Users/***/Documents/GitHub/ngx-moment/node_modules/@types/estree/index"' has no exported member named 'ChainExpression'. Did you mean 'ThisExpression'?

450         ChainExpression?: ((node: ESTree.ChainExpression & NodeParentExtension) => void) | undefined;
                                             ~~~~~~~~~~~~~~~
node_modules/@types/eslint/index.d.ts:473:43 - error TS2694: Namespace '"C:/Users/***/Documents/GitHub/ngx-moment/node_modules/@types/estree/index"' has no exported member 'ImportExpression'.

473         ImportExpression?: ((node: ESTree.ImportExpression & NodeParentExtension) => void) | undefined;

UPDATE: On different PC didn't get these build errors, so probably local environment issue.

aleperfetti81 commented 2 years ago

Hi have the same error message: Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)

Angular CLI: 13.0.3 Node: 16.13.0 Package Manager: npm 8.1.0 OS: win32 x64

Angular: 13.0.2 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router

Package Version

@angular-devkit/architect 0.1300.3 @angular-devkit/build-angular 13.0.3 @angular-devkit/core 13.0.3 @angular-devkit/schematics 13.0.3 @angular/cdk 13.0.3 @angular/cli 13.0.3 @angular/material 13.0.3 @angular/material-moment-adapter 13.0.3 @schematics/angular 13.0.3 rxjs 7.4.0 typescript 4.4.4

urish commented 2 years ago

Sorry, but I don't have the bandwidth to look into this right now. If anyone is up to it, I'd love to see a pull request. Otherwise I'll just revert the change and go back to v5.0.0

Rambou commented 2 years ago

@urish the v6 has already been publish on npmjs https://www.npmjs.com/package/ngx-moment it needs to be fixed now

tarlepp commented 2 years ago

Yep, I noticed the same after updating - Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)

marvin-w commented 2 years ago

I have the same error

Reverting to 5.0.0 works.

Stankman commented 2 years ago

Same error here! ./src/app/app.module.ts:69:12-32 - Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)

./src/app/app.module.ts:92:64-79 - Error: export 'MomentModule' (imported as 'i4') was not found in 'ngx-moment' (module has no exports)

tarlepp commented 2 years ago

hmm, no cannot see that 6.0.0 on releases page - https://github.com/urish/ngx-moment/releases/ - but npmjs.com is showing that 6.0.0 release - https://www.npmjs.com/package/ngx-moment

@urish was that a mistake version bump or are we really facing real issue here?

urish commented 2 years ago

@tarlepp real issue

lacroixdavid1 commented 2 years ago

Same issue here after updating to 6.0.0.


./projects/network/src/app/routes/offer/offer/offer-view/offer-view.module.ts:78:8-20 - Error: export 'DurationPipe' (imported as 'DurationPipe') was not found in 'ngx-moment' (module has no exports)

./projects/network/src/app/routes/offer/offer/offer-view/offer-view.module.ts:83:12-24 - Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)

./projects/network/src/app/routes/offer/offer/offer-view/offer-view.module.ts:160:8-20 - Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)
Koslun commented 2 years ago

Would appear that all exports from the package is broken? Hoping for some hero to fix this.

This is our errors:

 ./SOME_PATH - Error: export 'DateFormatPipe' (imported as 'DateFormatPipe') was not found in 'ngx-moment' (module has no exports)
../SOME_PATH - Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)
tobigit commented 2 years ago

Same error here: Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)

tarlepp commented 2 years ago

@urish is there some estimate when this is fixed? or is there something that we could help you with this issue?

urish commented 2 years ago

@tarlepp a pull request with a fix would be appreciated. I don't currently have the bandwidth to dig into why the tooling doesn't package the code correctly

tarlepp commented 2 years ago

looks like this repository doesn't have that 6.0.0 tag anymore but it exists on https://www.npmjs.com/package/ngx-moment - should that be also reverted?

CynanX commented 2 years ago

Hi. So I just came to take a look at this and see if I could fix it. I pulled down the master branch, built it locally, pointed to it in my local project and it works fine. Perhaps the issue is a bad deployment to the NPM repository only?

tarlepp commented 2 years ago

or maybe those two commits after 6.0.0 just fixed this already - https://github.com/urish/ngx-moment/commits/master ?

ETMitch21 commented 2 years ago

I'm experiencing this issue still and I just installed to a project.

Delagen commented 2 years ago

Resolved in #273. Please install 6.0.1 version

Delagen commented 2 years ago

@urish Sad by this occured https://github.com/urish/ngx-moment/issues/245. I open PR soon.