meta data for this page
How to resolve Node.js environment issues after upgrading N4V FOR WEBI
Anonymised summary of support ticket #660702 (2026-02-18)
Symptom
After upgrading N4V FOR WEBI, errors occur during Node.js module installation or execution, such as '/usr/bin/env: ‘node\r’: No such file or directory' or 'nvm is not compatible with the npm config "prefix" option'.
Environment
N4V FOR WEBI with Node.js v20.x, managed via NVM (Node Version Manager), SAP BusinessObjects Web Intelligence environment.
Resolution
- Ensure files are transferred in Unix format (LF line endings) to avoid Windows-style line endings (CRLF). Use commands like 'rsync -a' with appropriate options or 'dos2unix' to convert files.
- If the error '/usr/bin/env: ‘node\r’: No such file or directory' persists, edit the problematic Node.js script (e.g., npm-cli.js) and set the file format to Unix using 'vi' followed by ':set ff=unix' and save with ':wq'.
- If the error 'nvm is not compatible with the npm config "prefix" option' appears, remove or clear the contents of the 'npmrc' file located in the Node.js module directory (e.g., ~/.nvm/versions/node/v20.x.x/lib/node_modules/npm/npmrc).
- After clearing the 'npmrc' file, run 'nvm use --delete-prefix v20.x.x --silent' to reset the Node.js environment.
Other resolution
Ensure Node.js and NVM are correctly configured for the N4V FOR WEBI environment. Verify that the Node.js version matches the requirements of the N4V extension.