hyperledger-labs / blockchain-explorer

Apache License 2.0
1.41k stars 942 forks source link

mac M2 start.sh: applet not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn 2 npm ERR! file sh npm ERR! errno ENOENT #381

Open Junaidbt opened 1 year ago

Junaidbt commented 1 year ago

What happened?

Facing issue after docker-compose -up -d explorer unable to start 2023-04-15 23:17:55 > hyperledger-explorer@1.1.8 app-start /opt/explorer 2023-04-15 23:17:55 > ./start.sh 2023-04-15 23:17:55 2023-04-15 23:17:56 start.sh: applet not found 2023-04-15 23:17:56 npm ERR! code ELIFECYCLE 2023-04-15 23:17:56 npm ERR! syscall spawn 2023-04-15 23:17:56 npm ERR! file sh 2023-04-15 23:17:56 npm ERR! errno ENOENT 2023-04-15 23:17:56 npm ERR! hyperledger-explorer@1.1.8 app-start: ./start.sh 2023-04-15 23:17:56 npm ERR! spawn ENOENT 2023-04-15 23:17:56 npm ERR! 2023-04-15 23:17:56 npm ERR! Failed at the hyperledger-explorer@1.1.8 app-start script. 2023-04-15 23:17:56 npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2023-04-15 23:17:56 2023-04-15 23:17:56 npm ERR! A complete log of this run can be found in: 2023-04-15 23:17:56 npm ERR! /root/.npm/_logs/2023-04-15T19_17_56_018Z-debug.log

Log File: info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'app-start' ] 2 info using npm@6.14.4 3 info using node@v13.14.0 4 verbose run-script [ 'preapp-start', 'app-start', 'postapp-start' ] 5 info lifecycle hyperledger-explorer@1.1.8~preapp-start: hyperledger-explorer@1.1.8 6 info lifecycle hyperledger-explorer@1.1.8~app-start: hyperledger-explorer@1.1.8 7 verbose lifecycle hyperledger-explorer@1.1.8~app-start: unsafe-perm in lifecycle true 8 verbose lifecycle hyperledger-explorer@1.1.8~app-start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/explorer/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle hyperledger-explorer@1.1.8~app-start: CWD: /opt/explorer 10 silly lifecycle hyperledger-explorer@1.1.8~app-start: Args: [ '-c', './start.sh' ] 11 info lifecycle hyperledger-explorer@1.1.8~app-start: Failed to exec app-start script 12 verbose stack Error: hyperledger-explorer@1.1.8 app-start: ./start.sh 12 verbose stack spawn ENOENT 12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18) 12 verbose stack

What did you expect to happen?

it working fine on ubuntu , can you please help is this error due to Mac m2?

How can we reproduce it (as minimally and precisely as possible)?

run hyperledger explorer on mac m2 machine using first option deplotment

Anything else we need to know?

No response

OS version

On mac os M2 Machine:

info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'app-start' ] 2 info using npm@6.14.4 3 info using node@v13.14.0 4 verbose run-script [ 'preapp-start', 'app-start', 'postapp-start' ] 5 info lifecycle hyperledger-explorer@1.1.8~preapp-start: hyperledger-explorer@1.1.8 6 info lifecycle hyperledger-explorer@1.1.8~app-start: hyperledger-explorer@1.1.8 7 verbose lifecycle hyperledger-explorer@1.1.8~app-start: unsafe-perm in lifecycle true 8 verbose lifecycle hyperledger-explorer@1.1.8~app-start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/explorer/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle hyperledger-explorer@1.1.8~app-start: CWD: /opt/explorer 10 silly lifecycle hyperledger-explorer@1.1.8~app-start: Args: [ '-c', './start.sh' ] 11 info lifecycle hyperledger-explorer@1.1.8~app-start: Failed to exec app-start script 12 verbose stack Error: hyperledger-explorer@1.1.8 app-start: ./start.sh 12 verbose stack spawn ENOENT 12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18) 12 verbose stack

ArchanaArige commented 10 months ago

Hi @Junaidbt, Would like to know which version of fabric you are running. Please pull the latest images of explorer & explorer-db and try to bring up the explorer application. If the issue still exists, please free to further post here. Thanks.

ryanlovfer commented 3 months ago

Running based on source code, has anyone ever encountered a lifecycle lifecycle problem?


> hyperledger-explorer@1.1.8 start /node-data/code/fabric-explorer
> export NODE_ENV=production && run-s build app-start

> hyperledger-explorer@1.1.8 build /node-data/code/fabric-explorer
> tsc

> hyperledger-explorer@1.1.8 app-start /node-data/code/fabric-explorer
> ./start.sh

************************************************************************************
**************************** Hyperledger Explorer **********************************
************************************************************************************
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hyperledger-explorer@1.1.8 app-start: `./start.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hyperledger-explorer@1.1.8 app-start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-04-15T11_28_55_414Z-debug.log
ERROR: "app-start" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hyperledger-explorer@1.1.8 start: `export NODE_ENV=production && run-s build app-start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hyperledger-explorer@1.1.8 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-04-15T11_28_55_443Z-debug.log