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
RE: Error deploying ReactJS portlet
Liferay version: DXP 7.1 SP10
JS portlet extender version 1.1.0
Hi there - I'm testing out the creation of a React-based portlet and while it initially worked as advertised, I'm starting to see errors in the log so the portlet no longer works.
This is happening for both my custom portlet and newly-generated React portlets via the Yeoman generator. In addition, I see this error in the browser console:
Can anyone assist? Since I just started this process and I generated the portlet via Yeoman, I'm using the latest versions of the bundler and so forth.
JS portlet extender version 1.1.0
Hi there - I'm testing out the creation of a React-based portlet and while it initially worked as advertised, I'm starting to see errors in the log so the portlet no longer works.
2019-07-24 15:52:51.736 ERROR [Framework Event Dispatcher: Equinox Container: ae84e54c-a502-4efb-9990-e1f1460178f3][com_liferay_frontend_js_loader_modules_extender:97] FrameworkEvent ERROR java.lang.NullPointerExceptionat com.github.yuchi.semver.Version.compareTo(Version.java:158)at com.github.yuchi.semver.Version.compareTo(Version.java:5)at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)at java.util.Collections$ReverseComparator2.compare(Collections.java:5178)at java.util.TimSort.binarySort(TimSort.java:296)at java.util.TimSort.sort(TimSort.java:239)at java.util.Arrays.sort(Arrays.java:1512)at java.util.ArrayList.sort(ArrayList.java:1462)at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistryImpl._refreshJSModuleCaches(NPMRegistryImpl.java:341)at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistryImpl._processBundle(NPMRegistryImpl.java:279)at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistryImpl.access$400(NPMRegistryImpl.java:71)at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistryImpl$NPMRegistryBundleTrackerCustomizer.addingBundle(NPMRegistryImpl.java:428)at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistryImpl$NPMRegistryBundleTrackerCustomizer.addingBundle(NPMRegistryImpl.java:423)at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)at org.eclipse.osgi.container.Module.start(Module.java:467)at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428)at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1258)at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1230)at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)
This is happening for both my custom portlet and newly-generated React portlets via the Yeoman generator. In addition, I see this error in the browser console:
Liferay AMD Loader: Unhandled failure: <script src=""/combo/?browserId=other&minifierType=&languageId=en_US&b=7110&t=1563561430880&creste-event-reactjs@1.0.0.js""></script> while resolving modules: ["creste-event-reactjs@1.0.0"]
Can anyone assist? Since I just started this process and I generated the portlet via Yeoman, I'm using the latest versions of the bundler and so forth.
Hi Sandra:
First of all, can you follow this -> https://github.com/liferay/liferay-js-toolkit/wiki/How-to-troubleshoot-your-setups so that we can get more useful information? Using production settings makes it very hard to find out anything.
Also, do you know what changed between the moment it worked and after? Did you add any specific dependency for example?
Thx.
First of all, can you follow this -> https://github.com/liferay/liferay-js-toolkit/wiki/How-to-troubleshoot-your-setups so that we can get more useful information? Using production settings makes it very hard to find out anything.
Also, do you know what changed between the moment it worked and after? Did you add any specific dependency for example?
Thx.
Hi Ivan - here's what I get in the console after enabling debugging from your link:
I also see:
Liferay AMD Loader: Unhandled failure: Error: The following problems where detected while resolving modules:
Package create-event-reactjs$react which is a dependency of create-event-reactjs@1.0.0 is not deployed in the server
Package create-event-reactjs$react-dom which is a dependency of create-event-reactjs@1.0.0 is not deployed in the server
at Loader._getResolutionError (loader.js:331)
at loader.js:218 while resolving modules: ["create-event-reactjs@1.0.0/index"]
I also see:
<script src="[url=http://localhost:8080metal-dom/src/all/dom.js?languageId=en_US]http://localhost:8080metal-dom/src/all/dom.js?languageId=en_US" [ url]></script>
I think the problems started when I added simple-react-validator-hooks to my original React portlet. It had a dependency to react-scripts and when I added it that seems to be when the problems started.Thanks for your help.Ivan Zaera:
Hi Sandra:
First of all, can you follow this -> https://github.com/liferay/liferay-js-toolkit/wiki/How-to-troubleshoot-your-setups so that we can get more useful information? Using production settings makes it very hard to find out anything.
Also, do you know what changed between the moment it worked and after? Did you add any specific dependency for example?
Thx.
Pothapu Jagadeswara Reddy, modified 6 Years ago.
New Member
Posts: 4
Join Date: 7/23/19
Recent Posts
Hi Sandra, Please follow the steps https://portal.liferay.dev/docs/7-2/appdev/-/knowledge_base/a/developing-a-react-application if not followed. I tried today and working as expected.
Sandra is working on 7.1 ... you just pointed her to the 7.2 documentation. Did you use the 7.2 docs on a 7.2 install? or are you saying that those steps are working on a 7.1 install?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™