Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
adding new modules to angular portlet
For example we've added ng2-smart-table and after we import it ,we get errors from tomcat saying Path rxjs/Subject.js does not start with a "/" character along with console errors in the browser. Rxjs works fine otherwise, we've been using it since day 1. Our hypothesis is that something is happening when liferay wraps with the define method...it's really just a guess, but it's all we have at this point.
Could we be doing something wrong in our import/package management?
Edit: I've tried to import the module using the url path (similar to templateUrl). I can navigate to the module in a browser directly, but when I try and import it this way, compilation fails; Any ideas?
/o/my-portlet/node_modules/ng2-smart-table@1.2.2/index.js
Edit:
I've updated to Fix Pack 39, but to no avail. I get a more verbose error now from tomcat and a different one in the console
java.lang.IllegalArgumentException: Path :ERROR:Missing version constraints for rxjs in package.json of ng2-smart-table@1.2.2/Subject.js does not start with a "/" character
Attachments:
I have the same problem. We try to import primeng. Do you find solution?
Liferay AMD Loader: Unhandled failure: Error: The following
problems where detected while resolving modules:
Missing version
constraints for @angular/core in package.json of primeng@4.1.3
Missing version constraints for @angular/common in package.json of
primeng@4.1.3
at Loader._getResolutionError
(combo?browserId=othe…t-delegate.js:17307)
at
combo?browserId=othe…t-delegate.js:17207
at
ZoneDelegate.invoke
(?browserId=other&min…ular-loader.js:2905)
at Zone.run
(?browserId=other&min…ular-loader.js:2681)
at
?browserId=other&min…ular-loader.js:3369
at
ZoneDelegate.invokeTask
(?browserId=other&min…ular-loader.js:2930)
at
Zone.runTask (?browserId=other&min…ular-loader.js:2733)
at drainMicroTaskQueue (?browserId=other&min…ular-loader.js:3094)
while resolving modules
Please follow the steps here to migrate from bundler 1.x to 2.x.
Also, if you need more in-depth info about the problems with dependency handling in bundler 1.x please have a look at these 3 articles:
I think it makes sense to do the following:
- Remove this from you
package.json:
"@reactivex/rxjs": "^5.0.1",
- Remove your node_modules
- Run
npm install
Liferay AMD Loader: Unhandled failure: Error: The following problems where detected while resolving modules:
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/bidi
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/coercion
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/platform
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/a11y
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/keycodes
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/observers
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/overlay
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/portal
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/scrolling
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/layout
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/collections
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/text-field
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/accordion
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/stepper
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/table
Missing version constraints for @third-portlet$angular/cdk in package.json of @third-portlet$angular/material@7.3.0/tree
at Loader._getResolutionError (combo?browserId=other&minifierType=js&languageId=en_US&b=7102&t=1546901590920&/o/frontend-js-web/jquery/jquery.js&/o/frontend-js-web/clay/popper.js&/o/frontend-js-web/clay/bootstrap.js&/o/frontend-js-web/loader/config.js&/o/frontend-js-web/loader/loader.js&/o/frontend-js-web/aui/aui/aui.js&/o/frontend-js-web/aui/aui-base-html5-shiv/aui-base-html5-shiv.js&/o/frontend-js-web/liferay/browser_selectors.js&/o/frontend-js-web/liferay/modules.js&/o/frontend-js-web/liferay/aui_sandbox.js&/o/frontend-js-web/clay/collapsible-search.js&/o/frontend-js-web/clay/side-navigation.js&/o/frontend-js-web/jquery/fm.js&/o/frontend-js-web/jquery/form.js&/o/frontend-js-web/misc/svg4everybody.js&/o/frontend-js-web/aui/arraylist-add/arraylist-add.js&/o/frontend-js-web/aui/arraylist-filter/arraylist-filter.js&/o/frontend-js-web/aui/arraylist/arraylist.js&/o/frontend-js-web/aui/array-extras/array-extras.js&/o/frontend-js-web/aui/array-invoke/array-invoke.js&/o/frontend-js-web/aui/attribute-base/attribute-base.js&/o/frontend-js-web/aui/attribute-complex/attribute-complex.js&/o/frontend-js-web/aui/attribute-core/attribute-core.js&/o/frontend-js-web/aui/attribute-observable/attribute-observable.js&/o/frontend-js-web/aui/attribute-extras/attribute-extras.js&/o/frontend-js-web/aui/base-base/base-base.js&/o/frontend-js-web/aui/base-pluginhost/base-pluginhost.js&/o/frontend-js-web/aui/classnamemanager/classnamemanager.js&/o/frontend-js-web/aui/datatype-xml-format/datatype-xml-format.js&/o/frontend-js-web/aui/datatype-xml-parse/datatype-xml-parse.js&/o/frontend-js-web/aui/dom-base/dom-base.js&/o/frontend-js-web/aui/dom-core/dom-core.js&/o/frontend-js-web/aui/dom-screen/dom-screen.js&/o/frontend-js-web/aui/dom-style/dom-style.js&/o/frontend-js-web/aui/event-base/event-base.js&/o/frontend-js-web/aui/event-custom-base/event-custom-base.js&/o/frontend-js-web/aui/event-custom-complex/event-custom-complex.js&/o/frontend-js-web/aui/event-delegate/event-delegate.js&/o/frontend-js-web/aui/event-focus/event-focus.js:552)
at combo?browserId=other&minifierType=js&languageId=en_US&b=7102&t=1546901590920&/o/frontend-js-web/jquery/jquery.js&/o/frontend-js-web/clay/popper.js&/o/frontend-js-web/clay/bootstrap.js&/o/frontend-js-web/loader/config.js&/o/frontend-js-web/loader/loader.js&/o/frontend-js-web/aui/aui/aui.js&/o/frontend-js-web/aui/aui-base-html5-shiv/aui-base-html5-shiv.js&/o/frontend-js-web/liferay/browser_selectors.js&/o/frontend-js-web/liferay/modules.js&/o/frontend-js-web/liferay/aui_sandbox.js&/o/frontend-js-web/clay/collapsible-search.js&/o/frontend-js-web/clay/side-navigation.js&/o/frontend-js-web/jquery/fm.js&/o/frontend-js-web/jquery/form.js&/o/frontend-js-web/misc/svg4everybody.js&/o/frontend-js-web/aui/arraylist-add/arraylist-add.js&/o/frontend-js-web/aui/arraylist-filter/arraylist-filter.js&/o/frontend-js-web/aui/arraylist/arraylist.js&/o/frontend-js-web/aui/array-extras/array-extras.js&/o/frontend-js-web/aui/array-invoke/array-invoke.js&/o/frontend-js-web/aui/attribute-base/attribute-base.js&/o/frontend-js-web/aui/attribute-complex/attribute-complex.js&/o/frontend-js-web/aui/attribute-core/attribute-core.js&/o/frontend-js-web/aui/attribute-observable/attribute-observable.js&/o/frontend-js-web/aui/attribute-extras/attribute-extras.js&/o/frontend-js-web/aui/base-base/base-base.js&/o/frontend-js-web/aui/base-pluginhost/base-pluginhost.js&/o/frontend-js-web/aui/classnamemanager/classnamemanager.js&/o/frontend-js-web/aui/datatype-xml-format/datatype-xml-format.js&/o/frontend-js-web/aui/datatype-xml-parse/datatype-xml-parse.js&/o/frontend-js-web/aui/dom-base/dom-base.js&/o/frontend-js-web/aui/dom-core/dom-core.js&/o/frontend-js-web/aui/dom-screen/dom-screen.js&/o/frontend-js-web/aui/dom-style/dom-style.js&/o/frontend-js-web/aui/event-base/event-base.js&/o/frontend-js-web/aui/event-custom-base/event-custom-base.js&/o/frontend-js-web/aui/event-custom-complex/event-custom-complex.js&/o/frontend-js-web/aui/event-delegate/event-delegate.js&/o/frontend-js-web/aui/event-focus/event-focus.js:549 while resolving modules:
Someone knows the problem?, thanks!!!
i have got a similar error, does anyone has a solution about?
thanks
Powered by Liferay™