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
Issues in ReactJS Portlet
Hi All,
My Environment is Liferay DXP(7.2), Tomcat. I am using Liferay JS ToolKit to create a Sample ReactJS portlet. The initial basic ReactJS portlet is deployed perfectly without any issues. However, when I tried to add ReactJS Date Picker in the portlet it throws javascript exception and because of that, the portlet doesn't display anything. In my AppComponent.js I have added the date picker like below import DatePicker from "react-datepicker";
The package.json contains the below dependencies"dependencies": {
"react": "16.8.6",
"react-datepicker": "^2.14.1",
"react-dom": "16.8.6"
}
Beceause of the only react date picker import I am getting below dependency issues
Can anyone please help me?
Regards,
Hamidul
My Environment is Liferay DXP(7.2), Tomcat. I am using Liferay JS ToolKit to create a Sample ReactJS portlet. The initial basic ReactJS portlet is deployed perfectly without any issues. However, when I tried to add ReactJS Date Picker in the portlet it throws javascript exception and because of that, the portlet doesn't display anything. In my AppComponent.js I have added the date picker like below import DatePicker from "react-datepicker";
The package.json contains the below dependencies"dependencies": {
"react": "16.8.6",
"react-datepicker": "^2.14.1",
"react-dom": "16.8.6"
}
Beceause of the only react date picker import I am getting below dependency issues
· Error cause: Error: The following problems where detected while resolving modules:
[b] · Missing dependency 'sample-react$has@1.0.3/src' of 'sample-react$is-regex@1.0.5/index'
· Missing dependency 'sample-react$regexp.prototype.flags@1.3.0/index' of 'sample-react$deep-equal@1.1.1/index'[/b]
at e.value (loader.js:1)
at loader.js:1
18:18:19.045 loader.js:1 · Caller's stack trace: Error: This is not a real error, but a fake one created to capture require()'s caller stack trace
at e.value (loader.js:1)
at (index):2511Can anyone please help me?
Regards,
Hamidul
Attachments:
Hello Hamidul,
I'm also facing same issue. Did you get any solution ?
Thanks
Jiten Vaghela