ui.frontend node_modules import | Community
Skip to main content
sreenu539
Level 7
October 10, 2022
Solved

ui.frontend node_modules import

  • October 10, 2022
  • 1 reply
  • 674 views

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.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SantoshSai

Hi @sreenu539

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

Hope thats helps!

Regards,

Santosh

1 reply

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
November 27, 2022

Hi @sreenu539

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

Hope thats helps!

Regards,

Santosh

Santosh Sai