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
Liferay 7.1 + Angular 4 portlet
Hi All,
Have created an angular portlet in Liferay 7.1 CE with below command:
blade create -t npm-angular-portlet -p com.liferay.npm.angular -c MyNpmAngularPortlet my-npm-angular-portlet
The angular version is 4. Post deploying the portlet & adding it to the page gives following errors:
1) Uncaught ReferenceError: process is not defined
It is showing error:
// patch process related methods
Zone.__load_patch('nextTick', function (global, Zone, api) {
// patch nextTick as microTask
patchMicroTask(process, 'nextTick', function (self, args) {
return {
name: 'process.nextTick',
args: args,
callbackIndex: (args.length > 0 && typeof args[0] === 'function') ? 0 : -1,
target: process
};
});
});
Zone.__load_patch('nextTick', function (global, Zone, api) {
// patch nextTick as microTask
patchMicroTask(process, 'nextTick', function (self, args) {
return {
name: 'process.nextTick',
args: args,
callbackIndex: (args.length > 0 && typeof args[0] === 'function') ? 0 : -1,
target: process
};
});
});
2) Another error:
test:773 Error: Load timeout for modules: metal-dom/src/all/dom,metal-uri/src/Uri,clay-tooltip/src/ClayTooltip,my-npm-angular-portlet@1.0.0
Any help or suggestion on this?
Thanks in advance.
Attachments:
Do you know which package is using process.nextTick()
?
Is it inside your code or in an npm package?
process
is a Node.js global that is not available in the browser...
Hello,
We are starting to trying the generator liferay bundle (https://github.com/liferay/liferay-npm-build-tools/wiki/How-to-use-generator-liferay-bundle) to create a portlet for an angular application. The portlet generated is deployed in liferay 7.1 without problems.
But, now we have a problem when we start to develop the application.The application includes a CRUD of different entities, it’s not about making a SPA.We get this error when try to show a simple component:
Unhandled Promise rejection: Failed to load home.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load home.component.html undefined
There are any sample of the bundle with a component included.
Thanks in advance.
Fernando
We are starting to trying the generator liferay bundle (https://github.com/liferay/liferay-npm-build-tools/wiki/How-to-use-generator-liferay-bundle) to create a portlet for an angular application. The portlet generated is deployed in liferay 7.1 without problems.
But, now we have a problem when we start to develop the application.The application includes a CRUD of different entities, it’s not about making a SPA.We get this error when try to show a simple component:
Unhandled Promise rejection: Failed to load home.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load home.component.html undefined
There are any sample of the bundle with a component included.
Thanks in advance.
Fernando
Hello,
I was facing the same problem.
What i did was stopping the server, cleaned its cache (temp and work folder), removed my portlet from the modules folder, restarted the server, it's working again!
I did this because In here (https://issues.liferay.com/browse/BLADE-248) they say i could be related to liferay cache...
I was facing the same problem.
What i did was stopping the server, cleaned its cache (temp and work folder), removed my portlet from the modules folder, restarted the server, it's working again!
I did this because In here (https://issues.liferay.com/browse/BLADE-248) they say i could be related to liferay cache...
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™