cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Rush cannot run correctly after SAP Commerce Upgrade to 2105

janbu
Explorer
8,096

After updating our Instance to SAP Commerce 2105 (Patchlevel 2), the build fails in the Smartedittools step. It seems like the npm command it tries to run not works and there is not really an error message why it is not working. Output:

     [echo] Running [rush update] on path /home/user/hybris/bin/modules/smartedit/smartedittools
[exec]
[exec] Your version of Node.js (16.6.0) is not a Long-Term Support (LTS) release. These versions frequently have bugs. Please consider installing a stable release.
[exec]
[exec]
[exec] Rush Multi-Project Build Tool 5.50.0 - https://rushjs.io
[exec] Node.js version is 16.6.0 (pre-LTS)
[exec]
[exec]
[exec] Starting "rush update"
[exec]
[exec] Trying to acquire lock for pnpm-6.14.3
[exec] Acquired lock for pnpm-6.14.3
[exec] Installing pnpm version 6.14.3
[exec]
[exec] Deleting old files from /home/user/.rush/node-v16.6.0/pnpm-6.14.3
[exec] Transforming /home/user/hybris/bin/modules/smartedit/smartedittools/common/config/rush/.npmrc
[exec] --> "/home/user/.rush/node-v16.6.0/pnpm-6.14.3/.npmrc"
[exec]
[exec] Running "npm install" in /home/user/.rush/node-v16.6.0/pnpm-6.14.3
[exec]
[exec] The command failed:
[exec] npm install
[exec] ERROR: Error: The command failed with exit code 1
[exec]

Is there something I can do to make it work again? I have npm installed, but it seems like it uses a bundled version.

Accepted Solutions (1)

Accepted Solutions (1)

janbu
Explorer

I found the problem. Just in case someone has the same problem: In my case it was our Corporate Proxy (Zscaler) that causes the problem, because it intercepts all Traffic and NPM not used the System Certificate Store, so the connection was rejected.

The following command will add a certificate to the NPM Trust store. I added the Root-CA Certificate of Zscaler, that fixed the build:

export NODE_EXTRA_CA_CERTS=/path/to/custom/certificates/ZscalerRootCA.crt

This can also be added into the ~/.bashrc (or ~/.zshrc depending on the used shell) File.

Even am facing same error. where i have to run this command. Please provide clear path

Answers (2)

Answers (2)

janbu
Explorer
0 Kudos

We got the problem again, but this time for another reason... and this time for the patchlevel 18 of the 2105 Release.

If someone got the same error, I would recommend to run the "pnpm" command separatly and using the verbose parameter. To do this:

cd <HYBRIS_REPO>/hybris/bin/modules/smartedit/smartedittools/common/temp
<HYBRIS_REPO>/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies --loglevel verbose

In our case, there was an Issue with peer dependencies of eslint:

 WARN  Issues with peer dependencies found<br>.<br>├─┬ @typescript-eslint/eslint-plugin<br>│ ├── ✕ missing peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0"<br>│ └─┬ @typescript-eslint/experimental-utils<br>│   └── ✕ missing peer eslint@"*"<br>├─┬ @typescript-eslint/eslint-plugin-tslint<br>│ └── ✕ missing peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0"<br>├─┬ @typescript-eslint/parser<br>│ └── ✕ missing peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0"<br>├─┬ eslint-config-prettier<br>│ └── ✕ missing peer eslint@>=3.14.1<br>├─┬ eslint-plugin-deprecation<br>│ ├── ✕ missing peer eslint@"^6.0.0 || ^7.0.0"<br>│ └─┬ @typescript-eslint/experimental-utils<br>│   └── ✕ missing peer eslint@"*"<br>├─┬ eslint-plugin-import<br>│ ├── ✕ missing peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0"<br>│ └─┬ eslint-module-utils<br>│   └── ✕ missing peer eslint@"*"<br>├─┬ eslint-plugin-jsdoc<br>│ └── ✕ missing peer eslint@"^6.0.0 || ^7.0.0"<br>├─┬ eslint-plugin-prefer-arrow<br>│ └── ✕ missing peer eslint@>=2.0.0<br>└─┬ eslint-plugin-prettier<br>  └── ✕ missing peer eslint@>=5.0.0<br>Peer dependencies that should be installed:<br>  eslint@">=6.0.0 <7.0.0 || >=7.2.0 <8.0.0" 

After some debugging and pnpm command running we found the problem: Our extensions had referenced the "wrong" eslint version. After changing the version to the same as the other Smartedit extensions (see package.json of the other smartedit extensions), our problem was once again fixed.

chholzermsg
Participant
0 Kudos

Hi Jan,

I think it is the same issue as described here.

BR Christian

janbu
Explorer
0 Kudos

I tried the workaround provided in the linked question, but it didn't worked on my computer...

But thanks for the link!