cancel
Showing results for 
Search instead for 
Did you mean: 

Error while installing node_modules in Ui5 project in SAP BAS

jayeshsaini
Participant
0 Kudos

Hi,

Facing the following issue while doing npm i or npm install in Ui5 project in SAP BAS. Any idea how to fix this or can i ignore that?

Facing issue that all packages are not installing.

<dir-name> $ npm i
npm WARN lifecycle The node binary used for scripts is /extbin/bin/node but npm is using /opt/nodejs/node-v14.16.0-linux-x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.


> keytar@7.2.0 install /home/user/projects/<dir-name>/node_modules/keytar
> prebuild-install || npm run build


prebuild-install WARN install libsecret-1.so.0: cannot open shared object file: No such file or directory
npm WARN lifecycle The node binary used for scripts is /extbin/bin/node but npm is using /opt/nodejs/node-v14.16.0-linux-x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.


> keytar@7.2.0 build /home/user/projects/<dir-name>/node_modules/keytar
> node-gyp rebuild


/bin/sh: 1: pkg-config: not found
gyp: Call to 'pkg-config --libs-only-l libsecret-1' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/opt/nodejs/node-v14.16.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.4.0-5-cloud-amd64
gyp ERR! command "/opt/nodejs/node-v14.16.0-linux-x64/bin/node" "/opt/nodejs/node-v14.16.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/projects/<dir-name>/node_modules/keytar
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keytar@7.2.0 build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keytar@7.2.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?


npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2021-07-02T05_56_52_483Z-debug.log
npm WARN acorn-jsx@5.3.1 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/@ui5/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: keytar@7.2.0 (node_modules/keytar):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: keytar@7.2.0 install: `prebuild-install || npm run build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1


up to date in 5.519s


53 packages are looking for funding
  run `npm fund` for details
View Entire Topic
YuvalA
Advisor
Advisor
0 Kudos

Which project template are you using? can you send the complete output text?

jayeshsaini
Participant
0 Kudos

Hi yuval.anafi

Using the SAP Fiori Application, using the SAPUI5 Freestyle, in that using SAPUI5 Application.

jayeshsaini
Participant
0 Kudos

Also this is the complete output of "npm i" command. I have changed the folder name to <dir-name>