Expand my Community achievements bar.

SOLVED

error while installing the maven build AEM project.(mvn clean install)

Avatar

Level 2

Hi all,

I build a project using maven archetype 26 and when I tried to run mvn clean install -PautoInstallSinglePackage
It throws me error at npm install (UI frontend).

I thought npm should be upgraded but guess what I didn't even installed node.

I tried in another laptop following same steps, surprisingly I was able to install there (Didn't installed node here too)

So, If there is any particular solution that can solve this issue without installing node please let me know.npm-install-error.JPG

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Ohh, I understand this @rohith_m your organization policy has blocked github which is why you are NOT able to download the binding node.

1. You can either use a proxy which allows you to download the binary from github OR

2. alternatively, download the binary and set the binary path using : 

npm config set sass_binary_path <local_path_to_binary>

for instance,
npm config set sass_binary_path C:\Users\xxxx\Downloads\win32-64-64_binding.node

And this will resolve your issue. 

Because of this it worked fine on personal machine and not working on your client machine.

Thanks

View solution in original post

9 Replies

Avatar

Employee Advisor

hi @rohith_m ,

I think you already have installed a different version of node in your machine,

while the main POM.xml has particular versions mentioned as :

<configuration>
<nodeVersion>v10.13.0</nodeVersion>
<npmVersion>6.9.0</npmVersion> </configuration>

Check you local node and npm version installed globally using :

node -v
npm -v

and update the same in the POM accordingly in the main POM.

Thanks

 

Avatar

Level 2

Hi @milind_bachani 

I checked both my laptops I don't have node installed on my machine.

'node' is not recognized as an internal or external command, [same for the npm]

Please tell me Is node really necessary while running that command (mvn clean install).

Avatar

Employee Advisor

Hi @rohith_m 

Same is the case for me, I dont have npm & node installed globally and they are unrecognized, however, the build should work as it works for me positively.

Can you please post the error screenshot above the build status, the previous screenshot does not cover the full error. Or alternatively, please post the npm-debug.log

I have created an archetype 26 project and 'mvn clean install' works fine :

milind_bachani_0-1641552031055.png

 

Avatar

Level 2

Hi @milind_bachani 

 

 

npm1.JPGnpm2.JPGnpm3.JPG

the debug file was large. the page didn't responding after pasting it.

Avatar

Employee Advisor

@rohith_m As visible in the screenshot the node version is fine and matches with the pom, while npm versions are different :
POM has - 6.9.0 & 
your cmd shows - 3.10.8

 

You can check version by opening CMD at path (/ui.frontend/node) and execute : npm -v


Can you try deleting :
ui.frontend/node path and re-run the build.

To be on safer side you can also delete both:

ui.frontend/node
ui.frontend/node_modules

and re-run using 'mvn clean install'.

Thanks.

Avatar

Level 2

Hi @milind_bachani 
THANKS FOR THE REPLY.

I don't know why it showed 3.10.8 there, but I ran the same command and these are the images.npm1.JPGnpm2.JPGnpm3.JPGnpm4.JPG


I tried deleting the both node folders but got the same error.

I checked the node and npm versions inside ../ui.frontend/node  the versions were are as follows
node - v10.13.0

npm - 6.9.0

Avatar

Correct answer by
Employee Advisor

Ohh, I understand this @rohith_m your organization policy has blocked github which is why you are NOT able to download the binding node.

1. You can either use a proxy which allows you to download the binary from github OR

2. alternatively, download the binary and set the binary path using : 

npm config set sass_binary_path <local_path_to_binary>

for instance,
npm config set sass_binary_path C:\Users\xxxx\Downloads\win32-64-64_binding.node

And this will resolve your issue. 

Because of this it worked fine on personal machine and not working on your client machine.

Thanks

Avatar

Employee Advisor

Also, @rohith_m I see the github path gives 404,
can you check the package-lock.json file under path ui.frontend/package-lock.json and search for node-sass, and you might see a resolved key under that pointing to a URL which might be of github.

I would suggest to delete 

  • node
  • node-modules
  • package-lock.json

And rebuild the code and check.

Thanks 

Avatar

Level 2

Hi @milind_bachani 
yes the package.json has github url which might be the reason for the error..

even after deleting the node, node_modules and package.json [ package-lock.json file not generated ] it may still requires the github access which again throwing the error.

 

I can clearly see that it requires the github access or node to be installed.

Thanks again @milind_bachani .