cancel
Showing results for 
Search instead for 
Did you mean: 

ant npminstall giving error

former_member634058
Active Participant
0 Kudos

Hi Experts,

With SAP Commerce 2011, when I try to run ant npminstall on platform, I get the following error:

[echo] Running [npm install --loglevel=error]
[exec]
[exec] > npmancillary@1.0.0 install
[exec] > webdriver-manager update --gecko false --standalone false
[exec]
[exec] [00:10:46] I/file_manager - creating folder /Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/resources/npm/node_modules/protractor/node_modules/webdriver-manager/selenium
[exec] [00:10:46] I/config_source - curl -o/Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/resources/npm/node_modules/protractor/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
[exec] node:events:368
[exec] throw er; // Unhandled 'error' event
[exec] ^
[exec]
[exec] Error: read ECONNRESET
[exec] at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)
[exec] Emitted 'error' event on Request instance at:
[exec] at Request.onRequestError (/Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/resources/npm/node_modules/request/request.js:877:8)
[exec] at ClientRequest.emit (node:events:402:35)
[exec] at TLSSocket.socketErrorListener (node:_http_client:447:9)
[exec] at TLSSocket.emit (node:events:390:28)
[exec] at emitErrorNT (node:internal/streams/destroy:157:8)
[exec] at emitErrorCloseNT (node:internal/streams/destroy:122:3)
[exec] at processTicksAndRejections (node:internal/process/task_queues:83:21) {
[exec] errno: -54,
[exec] code: 'ECONNRESET',
[exec] syscall: 'read'
[exec] }
[exec] npm ERR! code 1
[exec] npm ERR! path /Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/resources/npm
[exec] npm ERR! command failed
[exec] npm ERR! command sh -c webdriver-manager update --gecko false --standalone false
[exec]
[exec] npm ERR! A complete log of this run can be found in:
[exec] npm ERR! /Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/resources/npm/.cache/_logs/2022-01-27T18_40_48_381Z-debug.log
BUILD FAILED
/Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/buildcallbacks.xml:323: The following error occurred while executing this line:
/Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/buildcallbacks.xml:318: The following error occurred while executing this line:
/Users/skh/Desktop/SAPDevelop/myproj/CXCOMM201100P_16-70005693/hybris/bin/modules/npm-ancillary/npmancillary/buildcallbacks.xml:83: exec returned: 1
Is there a way we can fix this error and do a successful npm installation.
View Entire Topic
former_member634058
Active Participant
0 Kudos

Got the solution.

This is an issue with SAP Commerce 2011.16. This issue is primarily with MAC users.

Solution:

In the buildcallbacks.xml file of npmancillary extension, modify the line

<invokeNpm arguments="install --loglevel=error "/>

with

<invokeNpm arguments="install --loglevel=error --prefer-offline --no-audit"/>

It bypasses the problem, but since it is local MAC, it is okay to do so. It can also make the build 15 times faster.