Skip to main content
sreenu539
Level 7
October 10, 2022
Resuelto

ui.frontend node_modules import

  • October 10, 2022
  • 1 respuesta
  • 691 visualizaciones

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.

 

 

Este tema ha sido cerrado para respuestas.
Mejor respuesta de SantoshSai

Hi @sreenu539, 

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

Hope thats helps!

Regards,

Santosh

1 respuesta

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorRespuesta
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