Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to clear yarn / npm cache, or remove *.lock files

vadi
Level 1
Level 1

So, currently my project does not commit yarn.lock to the repository.
And I have access to https://experience.adobe.com/#/@myproject/cloud-manager/home.html/program/00001 to perform deployment (Real URI is redacted).

 

Currently, the build is failing due to one of the npm dependencies major version has changed.

I am wondering if there's any way we can clear yarn cache or lock files from the platform.

 

Error Log (Redacted):

06:39:39,772 [Exec Stream Pumper] [INFO] info If you think this is a bug, please open a bug report with the information provided in "/build_root/build/someprogram2-p33333/ui.frontend/yarn-error.log".error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/build_root/build/someprogram2-p33333/xps-react/node_modules/autoprefixer'".

 

Sorry if this has been asked before, I am fairly new to AEM.

Please kindly assist me.

1 Accepted Solution
ArunaSurukunta
Correct answer by
Level 5
Level 5

@Umesh_Thakur ,

 

Download the source code to your local machine and try to build to replicate the issue in your local. Once you're able to replicate the issue in your local machine then you delete node module and re build the code.

If your build is success then you can raise support ticket to clean up the node module to solve the build issue.

 

Hope this helps you!!

 

Thanks!!!.

View solution in original post

0 Replies
Umesh_Thakur
Community Advisor
Community Advisor

try to delete your node module folder and run npm install command and see.

It should work fine.

UmeshThakur

vadi
Level 1
Level 1

Hi @Umesh_Thakur - Thanks for the response.

The node_modules directories are not committed. So I assume when the build starts it shouldn't have any, right? Or is there anyway I can SSH to cloud manager and run the build manually?

Asutosh_Jena_
Community Advisor
Community Advisor

Hi @vadi 

 

Please raise a ticket to the support team and they will be able to delete the folder for you. We do not have SSH access to the system where we can go and remove the file.

 

Thanks!

ArunaSurukunta
Correct answer by
Level 5
Level 5

@Umesh_Thakur ,

 

Download the source code to your local machine and try to build to replicate the issue in your local. Once you're able to replicate the issue in your local machine then you delete node module and re build the code.

If your build is success then you can raise support ticket to clean up the node module to solve the build issue.

 

Hope this helps you!!

 

Thanks!!!.

View solution in original post

vadi
Level 1
Level 1

You're right, the issue intermittenly happens in my local, and somehow I missed this.
Thanks!