The application's main-menu fails to render due to an error with momentjs:
logger-protocol.ts:112 root ERROR TypeError: moment is not a function
at new BlameDecorator (http://localhost:9090/64.bundle.js:458:20)
at _createInstance (http://localhost:9090/bundle.js:46628:12)
at Object.resolveInstance (http://localhost:9090/bundle.js:46648:18)
at http://localhost:9090/bundle.js:46745:42
at Array.map (<anonymous>)
at _injectProperties (http://localhost:9090/bundle.js:46618:57)
at Object.resolveInstance (http://localhost:9090/bundle.js:46649:18)
at http://localhost:9090/bundle.js:46745:42
at Object.resolve (http://localhost:9090/bundle.js:46769:12)
at http://localhost:9090/bundle.js:45731:37
The following error has been reported and reproduced in a number of ways:
There is an issue where others have expressed similar breaking changes for moment and they performed the same rollback in version:
There are numerous ways to produce the bug, one possible way is to run the docker image, or to compose your own application following the guide from the website.
Also experiencing the same issue.
Reproduced with node version v10.20.1.
Followed all the steps with https://theia-ide.org/docs/composing_applications
@vince-fugnitto do you currently have a workaround available?
Based on the PR, you can try to force the desired version of moment. I have not tried it yet; does it work if you add this to your root packages.json?
"resolutions": {
"**/**/moment": "2.24.0"
},
It does work for me. We'll have to use this as a workaround until the maintainers fix the moment version.
(First time installing theia; I thought the broken UI was really the awesome ide everyone's happy about lamo)
Based on the PR, you can try to force the desired version of
moment. I have not tried it yet; does it work if you add this to your rootpackages.json?"resolutions": { "**/**/moment": "2.24.0" },
It work for me too, ths
There are 2 things:
I don鈥檛 think it was a missing command, as it is just a broken dependency.
@vince-fugnitto it is fine to pin it.
But I meant that the menu registration should not blow up the whole menu bar if one command failed to be registered.
@https://github.com/vince-fugnitto it is fine to pin it.
But I meant that the menu registration should not blow up the whole menu bar if one command failed to be registered.
Yes I agree, there should be better handling in order to prevent such issues, especially since it breaks the entire main menu.
But I meant that the menu registration should not blow up the whole menu bar if one command failed to be registered.
Should we open a follow-up issue to be more robust when creating menus/commands and not fail if one is missing?
@vince-fugnitto yes, thanks
@vince-fugnitto yes, thanks
Most helpful comment
Based on the PR, you can try to force the desired version of
moment. I have not tried it yet; does it work if you add this to your rootpackages.json?