Expand my Community achievements bar.

SOLVED

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

Avatar

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

Avatar

Correct answer by
Community Advisor

@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

5 Replies

Avatar

Community Advisor

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

It should work fine.

UmeshThakur

Avatar

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?

Avatar

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!

Avatar

Correct answer by
Community Advisor

@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!!!.

Avatar

Level 1

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