LR 7.3 - React Portlet: Invalid hook callLR 7.3 - React Portlet: Invalid hook callhttps://liferay.dev/c/message_boards/find_thread?p_l_id=119785333&threadId=1185968222024-03-28T11:37:22Z2024-03-28T11:37:22ZRE: LR 7.3 - React Portlet: Invalid hook callMarc Endtrichthttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1213301472022-01-19T13:41:22Z2022-01-13T12:14:32Z<p>I successfully build the portlet from rahul on 7.4 (as a gradle project).</p>
<p>I created a component called CustomButton and called it with the
<react:component> tag.</p>
<pre>
<code class="language-javascript">import React from 'react';
import ClayButton from '@clayui/button';
const CustomButton = () => {
return (
<ClayButton
displayType='primary'
>
Test
</ClayButton>
);
}
export default CustomButton;</code></pre>
<p>So far so good. Once i add a hook like useState, for example:</p>
<pre>
<code class="language-javascript">const CustomButton = () => {
const [name, setName] = React.useState('test');
...</code></pre>
<p>the original problem still exists. The browser console tells me:</p>
<blockquote>
<p>Minified React error #321; visit
https://reactjs.org/docs/error-decoder.html?invariant=321 for the
full message</p></blockquote>
<p>My package.json looks like this:</p>
<pre>
<code>{
"dependencies": {
"@clayui/button": "^3.40.0",
"@clayui/css": "3.x",
"react": "^16.12.0",
"react-dom": "^16.12.0"
},
"devDependencies": {
"@liferay/npm-scripts": "47.0.0",
"react-test-renderer": "^16.12.0"
},
"name": "component-test",
"scripts": {
"build": "liferay-npm-scripts build"
},
"version": "1.0.0"
}
</code></pre>
<p>
<strong>EDIT:</strong></p>
<p>I finally got it working. Reducing package.json like this:</p>
<pre>
<code>{
"devDependencies": {
"@liferay/npm-scripts": "47.0.0"
},
"name": "component-test",
"scripts": {
"build": "liferay-npm-scripts build"
},
"version": "1.0.0"
}</code></pre>
<p>and adding a ".npmbundlerrc" in modules root with content:</p>
<pre>
<code>{
"config": {
"imports": {
"frontend-taglib-clay": {
"@clayui/button": ">=3.40.0",
"@clayui/css": ">=3.x"
},
"@liferay/frontend-js-react-web": {
"react": ">=16.12.0"
}
}
}
}</code></pre>
<p>did the trick.</p>
<p>Working example is at https://github.com/ReFl3x0r/liferay-react-component-test/tree/working</p>Marc Endtricht2022-01-13T12:14:32ZRE: LR 7.3 - React Portlet: Invalid hook callrahul bhonsalehttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192921482020-06-02T07:40:22Z2020-06-02T07:40:22ZIf anyone is using maven, I have built a working Portlet for 7.3.1 and posted it in this repository:<a href="https://github.com/rahulahoop/liferay-react-component-portlet">https://github.com/rahulahoop/liferay-react-component-portlet</a><br />HTH!rahul bhonsale2020-06-02T07:40:22ZRE: LR 7.3 - React Portlet: Invalid hook callrahul bhonsalehttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192418212020-05-26T15:05:26Z2020-05-26T15:05:26Zplease take a look at my post tagged to you down below about liferay-npm-scripts and npmbundlerrcrahul bhonsale2020-05-26T15:05:26ZRE: LR 7.3 - React Portlet: Invalid hook callrahul bhonsalehttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192407542020-05-26T14:16:21Z2020-05-26T14:16:21Z<html><head></head><body>I have a working solution right now, i will post my solution soon.<br><br>a couple questions tho:<br><br>1. Must i name my js files with es.js ? is there a way to not use es ?<br><br>2. it seems that liferay-npm-scripts isnt adding the translated js file to the jar, i have to explicitly include it in the bnd file. Is there npmbundlerrc config for this ?<br><br>currently mine looks like this<br><br><br><pre><code>[code]{
"output": "target/classes/META-INF/resources",
".babelrc": {
"presets": ["liferay-standard"]
}
}</code></pre><pre><code></code></pre><br>@Ivan Zaera</body></html>rahul bhonsale2020-05-26T14:16:21ZRE: LR 7.3 - React Portlet: Invalid hook callrahul bhonsalehttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192400222020-05-26T11:29:10Z2020-05-26T11:29:10Z<html><head></head><body>found out theres a syntax error when its rendering the react code. it looks like, its putting the react code outside the liferay loader.. Its calling syntax error on the import statement<br><pre><code>Liferay.Loader.define('frontend-js-metal-web@4.0.2/bridge/metal-dom/src/all/dom', ['module', 'frontend-js-metal-web$metal-dom/lib/all/dom'], function (module, src) {
module.exports = src;
});
Liferay.Loader.define("portal-template-react-renderer-impl@4.0.2/render.es", ['module', 'exports', 'require', 'frontend-js-react-web'], function (module, exports, require) {
var define = undefined;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = _default;
var _frontendJsReactWeb = require("frontend-js-react-web");
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
function _default(renderFunction, renderData, placeholderId) {
var element = document.getElementById(placeholderId);
if (element) {
(0, _frontendJsReactWeb.render)(renderFunction, renderData, element.parentElement);
}
}
//# sourceMappingURL=render.es.js.map
});
//# sourceMappingURL=render.es.js.map
import React from 'react'; // browser fails here
function App() {
console.log("HI FROM REACT");
return (
<div classname="App">
<h1> WOW IM FROM REACT! </h1>
</div>
);
}
export default App;</code></pre></body></html>rahul bhonsale2020-05-26T11:29:10ZRE: LR 7.3 - React Portlet: Invalid hook callrahul bhonsalehttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192385932020-05-26T09:47:06Z2020-05-26T09:47:06ZIve created a repo with the portlet code.<br />All help will be greatly appreciated!!!<a href="https://github.com/rahulahoop/liferay-react-component-portlet">https://github.com/rahulahoop/liferay-react-component-portlet</a><br />Thanks in advance^^rahul bhonsale2020-05-26T09:47:06ZRE: LR 7.3 - React Portlet: Invalid hook callGreg Hurrellhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192375192020-05-26T07:21:23Z2020-05-26T07:21:23Z<p>I can&#39;t see an obvious explanation for what&#39;s wrong there, but I&#39;m coming more from the React side and less from the Portal/Maven side. Would it be possible to reduce this to an absolute minimum repro case (with very clear instructions to replicate the exact steps that you are taking and all of the details of your enviroment) that you could stick in a Git repo somewhere to take a look? It&#39;s possible that somebody who knows more about this than me and has experience with carrying out the task that you are trying to perform would be able to provide some pointers just based on what you&#39;ve posted here, but I personally don&#39;t know.</p>Greg Hurrell2020-05-26T07:21:23ZRE: LR 7.3 - React Portlet: Invalid hook callrahul bhonsalehttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1192320712020-05-25T16:18:26Z2020-05-25T16:18:26Z<html><head></head><body>Im having the same issue. i have a very simple mvc portlet using maven. no npmbundlerrc.<br>I run npm install but when i deploy the module, he doesnt include the node_modules in the target folder--package.json<pre><code>{
"dependencies": {
"react": "16.12.0"
},
"name": "reactlet",
"scripts": {
"build": "liferay-npm-scripts build",
"checkFormat": "liferay-npm-scripts check",
"format": "liferay-npm-scripts fix"
},
"version": "1.0.0"
}
</code></pre>-- view.jsp<br><pre><code><div>
&lt;%
Map<string, object> data = new HashMap&lt;&gt;();
data.put("color", colorScheme);
%&gt;
&lt;[b]react[/b][b]:component
[/b][b] [/b]data="&lt;%=data%&gt;"
module="js/index.es"
servletContext="&lt;%=application%&gt;" /&gt;
</string,></div></code></pre>-- index.js<pre><code>import React, {useState} from 'react';
function App() {
return (
<div classname="App">
<h1> WOW IM FROM REACT! </h1>
</div>
);
}
export default App;</code></pre><br>Whats missing here ? <br>EDIT:<br>Ive added this line to the bnd.bnd which resolves the NPE error but now the brower throws "missing module" errors.<br><pre><code>-includeresource: META-INF/resources=node_modules/, META-INF/resources/=package.json</code></pre>(see screen shot for errors)</body></html>rahul bhonsale2020-05-25T16:18:26ZRE: LR 7.3 - React Portlet: Invalid hook callErik Straußhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1187145052020-03-11T10:49:48Z2020-03-11T10:49:48ZI unzipped the jar file and there was no package.json available. Why should it be in there? <br />The portlet is a standard MVC portlet from the Blade CLI. I took the init.jsp and view.jsp and added only the react:component taglib and my React JS classes.<br />My workspace is also a standard workspace which I have created with blade ("blade init" or similar)<br />Which files would still be important for the error? Thanks!Erik Strauß2020-03-11T10:49:48ZRE: LR 7.3 - React Portlet: Invalid hook callIván Zaera Avellónhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1187141002020-03-11T08:17:40Z2020-03-11T08:17:40ZThe NPE usually happens when there's something wrong with the bundling. Most of the times it is due to a missing package.json inside the META-INF/resources folder of the JAR. But without seeing the setup it is difficult to tell.<br /><br />Hope that helps.Iván Zaera Avellón2020-03-11T08:17:40ZRE: LR 7.3 - React Portlet: Invalid hook callErik Straußhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1187115262020-03-10T17:41:47Z2020-03-10T17:41:47Z<html><head></head><body>I switched from liferay-npm-bundler to liferay-npm-scripts. Thats my package.json now:<br><br><pre><code>[code]
{
&nbsp;&nbsp; &nbsp;"dependencies": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"prop-types": "^15.7.2",
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"react": "16.13.0",
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"react-dom": "16.13.0"
&nbsp;&nbsp; &nbsp;},
&nbsp;&nbsp; &nbsp;"devDependencies": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"liferay-npm-scripts": "28.0.2"
&nbsp;&nbsp; &nbsp;},
&nbsp;&nbsp; &nbsp;"main": "lib/index.es.js",
&nbsp;&nbsp; &nbsp;"name": "react-example-portlet",
&nbsp;&nbsp; &nbsp;"scripts": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"build": "liferay-npm-scripts build"
&nbsp;&nbsp; &nbsp;},
&nbsp;&nbsp; &nbsp;"version": "1.0.0"
}
</code></pre><br>But now I get the following exception while loading the page:<br><br><pre><code>2020-03-10 15:09:50.541 ERROR [http-nio-8080-exec-3][PortletRequestDispatcherImpl:304] Unable to dispatch request: java.lang.NullPointerException
2020-03-10 15:09:50.543 ERROR [http-nio-8080-exec-3][PortletServlet:119] javax.portlet.PortletException: javax.servlet.ServletException: java.lang.NullPointerException
javax.portlet.PortletException: javax.servlet.ServletException: java.lang.NullPointerException
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:307)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:123)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:572)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:588)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:176)
&nbsp;&nbsp; &nbsp;at com.react.example.portlet.ReactExamplePortlet.doView(ReactExamplePortlet.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:286)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:465)
&nbsp;&nbsp; &nbsp;at javax.portlet.GenericPortlet.render(GenericPortlet.java:291)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:304)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:127)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:58)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:124)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:115)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.InvokerPortletImpl.invoke(InvokerPortletImpl.java:571)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:661)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.InvokerPortletImpl.render(InvokerPortletImpl.java:344)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.lambda$render$0(MonitoringInvokerPortlet.java:259)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet._render(MonitoringInvokerPortlet.java:363)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:257)
&nbsp;&nbsp; &nbsp;at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(Unknown Source)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletContainerImpl._render(PortletContainerImpl.java:908)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletContainerImpl.lambda$render$2(PortletContainerImpl.java:223)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletContainerImpl._preserveGroupIds(PortletContainerImpl.java:425)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletContainerImpl.render(PortletContainerImpl.java:211)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:145)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.RestrictPortletContainerWrapper.lambda$render$0(RestrictPortletContainerWrapper.java:128)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.RestrictPortletContainerWrapper._render(RestrictPortletContainerWrapper.java:189)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.layoutconfiguration.util.PortletRenderer._render(PortletRenderer.java:209)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.layoutconfiguration.util.PortletRenderer.render(PortletRenderer.java:87)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:593)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:359)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:160)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:185)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.layoutconfiguration.util.RuntimePageUtil.processTemplate(RuntimePageUtil.java:105)
&nbsp;&nbsp; &nbsp;at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(Unknown Source)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.model.impl.LayoutTypeControllerImpl.includeLayoutContent(LayoutTypeControllerImpl.java:166)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.model.impl.LayoutImpl.includeLayoutContent(LayoutImpl.java:890)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:413)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:170)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:415)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:155)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:205)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.internal.servlet.MainServlet.service(MainServlet.java:622)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
&nbsp;&nbsp; &nbsp;at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:409)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:99)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:368)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:87)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:264)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:360)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
&nbsp;&nbsp; &nbsp;at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
&nbsp;&nbsp; &nbsp;at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
&nbsp;&nbsp; &nbsp;at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
&nbsp;&nbsp; &nbsp;at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
&nbsp;&nbsp; &nbsp;at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
&nbsp;&nbsp; &nbsp;at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
&nbsp;&nbsp; &nbsp;at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
&nbsp;&nbsp; &nbsp;at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
&nbsp;&nbsp; &nbsp;at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
&nbsp;&nbsp; &nbsp;at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
&nbsp;&nbsp; &nbsp;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
&nbsp;&nbsp; &nbsp;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
&nbsp;&nbsp; &nbsp;at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
&nbsp;&nbsp; &nbsp;at java.lang.Thread.run(Thread.java:748)
Caused by: javax.servlet.ServletException: java.lang.NullPointerException
&nbsp;&nbsp; &nbsp;at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:950)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:885)
&nbsp;&nbsp; &nbsp;at com.liferay.taglib.servlet.PageContextWrapper.handlePageException(PageContextWrapper.java:173)
&nbsp;&nbsp; &nbsp;at org.apache.jsp.view_jsp._jspService(view_jsp:192)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:373)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:385)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:291)
&nbsp;&nbsp; &nbsp;... 181 more
Caused by: java.lang.NullPointerException
&nbsp;&nbsp; &nbsp;at com.liferay.frontend.taglib.react.servlet.taglib.ComponentTag.getModule(ComponentTag.java:90)
&nbsp;&nbsp; &nbsp;at com.liferay.frontend.taglib.react.servlet.taglib.ComponentTag.doEndTag(ComponentTag.java:49)
&nbsp;&nbsp; &nbsp;at org.apache.jsp.view_jsp._jspService(view_jsp:180)
&nbsp;&nbsp; &nbsp;... 194 more
2020-03-10 15:09:50.547 ERROR [http-nio-8080-exec-3][render_portlet_jsp:131] null
java.lang.NullPointerException
&nbsp;&nbsp; &nbsp;at com.liferay.frontend.taglib.react.servlet.taglib.ComponentTag.getModule(ComponentTag.java:90)
&nbsp;&nbsp; &nbsp;at com.liferay.frontend.taglib.react.servlet.taglib.ComponentTag.doEndTag(ComponentTag.java:49)
&nbsp;&nbsp; &nbsp;at org.apache.jsp.view_jsp._jspService(view_jsp:180)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
&nbsp;&nbsp; &nbsp;at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
&nbsp;&nbsp; &nbsp;at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:373)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:385)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:291)
&nbsp;&nbsp; &nbsp;at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:123)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:572)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:588)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:176)</code></pre></body></html>Erik Strauß2020-03-10T17:41:47ZLR 7.3 - React Portlet: Invalid hook callErik Straußhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1185968212020-02-26T13:45:19Z2020-02-26T13:45:19Z<html><head></head><body>Hello!<br>I am working on a React portlet based on Liferay 7.3 GA1. For this, I use the new <react:component> and so far it works quite well.<br>But when I use a hook in my React function component, I get errors in the browser console:<br><em>"Hooks can only be called inside of the body of a function component."</em><br><br>Hier ist meine index.es.js:<br><pre><code>import React, { useState } from 'react';
import PropTypes from 'prop-types';
const ReactTestComponent = ({
headline
}) =&gt; {
const [count, setCount] = useState(0);
return (
<div>
<div>
<h1>React Test Portlet</h1>
</div>
<div>{headline} and {count}</div>
</div>
);
};
ReactTestComponent.propTypes = {
headline: PropTypes.string
};
export default function (props) {
return <reacttestcomponent {...props} />;
}</code></pre><br>This is my package.json:<br><br><pre><code>
{
"dependencies": {
"react": "16.12.0",
"react-dom": "16.12.0",
"prop-types": "^15.7.2"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-preset-env": "1.7.0",
"babel-preset-react": "6.24.1",
"babel-loader": "7.1.5",
"liferay-npm-bundler": "^2.17.1",
"liferay-npm-build-support": "^2.17.1"
},
"main": "lib/index.es.js",
"name": "react-example-portlet",
"scripts": {
"build": "babel --source-maps -d build/resources/main/META-INF/resources src/main/resources/META-INF/resour