on 2021 Oct 25 12:53 PM
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.
Request clarification before answering.
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.crtThis can also be added into the ~/.bashrc (or ~/.zshrc depending on the used shell) File.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even am facing same error. where i have to run this command. Please provide clear path
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 verboseIn 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.