Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

ui.frontend node_modules import

Avatar

Level 7

I have export of js , which is part of node_modules/ui-foundation-star

 

I used below statement in main.ts to import specific js function

 

import {scopecomponent} from '@ui-foundation-star/scope'

scopecomponent('project-name');

 

This works fine in my local. but on gitlab pipeline above import statement looks for node_modules and at relative path below /webpack etc and says could not find it.

 

Question: Is the way i am importing is correct? if so, why it is not working in gitlab but working in local aem.

 

sreenu539_0-1665439487963.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @sreenu539

Try clearing node_module and check, it should refetch and resolve the paths to imports.

Hope thats helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @sreenu539

Try clearing node_module and check, it should refetch and resolve the paths to imports.

Hope thats helps!

Regards,

Santosh


Santosh Sai

AEM BlogsLinkedIn