IBM / blockchainbean2

This code pattern shows how to model a supply-chain network using the IBM Blockchain Platform and is based on a collaboration with Brooklyn Roasting Company. The story, along with the supply-chain documents that were used to model this network, can be found at: https://www.ibm.com/blockchainbean. Note that the 'view the blockchain' button is being migrated''
https://developer.ibm.com/patterns/coffee-supply-chain-network-hyperledger-fabric-blockchain-2/
122 stars 84 forks source link

error TS5056: Cannot write file '/home/tony/blockchainbean2/web-app/dist/src/datasources/db.datasource.d.ts' because it would be overwritten by multiple input files. #16

Open MogicTony opened 4 years ago

MogicTony commented 4 years ago

hey, this is happende after Add Members to the network Let's bring up a new terminal window, and in that terminal, go to the blockchainbean2 directory that we cloned earlier, and start the app in that window with the following command.

blockchainbean2$ cd web-app web-app$ npm start

~/blockchainbean2/web-app$ npm start

beanclient@1.0.0 prestart /home/tony/blockchainbean2/web-app npm run build

beanclient@1.0.0 build /home/tony/blockchainbean2/web-app lb-tsc es2017 --outDir dist

error TS5056: Cannot write file '/home/tony/blockchainbean2/web-app/dist/src/datasources/db.datasource.d.ts' because it would be overwritten by multiple input files.

Found 1 error.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! beanclient@1.0.0 build: lb-tsc es2017 --outDir dist npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the beanclient@1.0.0 build 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! /home/tony/.npm/_logs/2019-12-05T17_54_25_976Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! beanclient@1.0.0 prestart: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the beanclient@1.0.0 prestart 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! /home/tony/.npm/_logs/2019-12-05T17_54_25_983Z-debug.log

MogicTony commented 4 years ago

here is the debug.log

0 info it worked if it ends with ok 1 verbose cli [ '/home/tony/.nvm/versions/node/v8.16.2/bin/node', 1 verbose cli '/home/tony/.nvm/versions/node/v8.16.2/bin/npm', 1 verbose cli 'start' ] 2 info using npm@6.4.1 3 info using node@v8.16.2 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle beanclient@1.0.0~prestart: beanclient@1.0.0 6 verbose lifecycle beanclient@1.0.0~prestart: unsafe-perm in lifecycle true 7 verbose lifecycle beanclient@1.0.0~prestart: PATH: /home/tony/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/tony/blockchainbean2/web-app/node_modules/.bin:/home/tony/.nvm/versions/node/v8.16.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 8 verbose lifecycle beanclient@1.0.0~prestart: CWD: /home/tony/blockchainbean2/web-app 9 silly lifecycle beanclient@1.0.0~prestart: Args: [ '-c', 'npm run build' ] 10 silly lifecycle beanclient@1.0.0~prestart: Returned: code: 1 signal: null 11 info lifecycle beanclient@1.0.0~prestart: Failed to exec prestart script 12 verbose stack Error: beanclient@1.0.0 prestart: npm run build 12 verbose stack Exit status 1 12 verbose stack at EventEmitter. (/home/tony/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 12 verbose stack at emitTwo (events.js:126:13) 12 verbose stack at EventEmitter.emit (events.js:214:7) 12 verbose stack at ChildProcess. (/home/tony/.nvm/versions/node/v8.16.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 12 verbose stack at emitTwo (events.js:126:13) 12 verbose stack at ChildProcess.emit (events.js:214:7) 12 verbose stack at maybeClose (internal/child_process.js:915:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 13 verbose pkgid beanclient@1.0.0 14 verbose cwd /home/tony/blockchainbean2/web-app 15 verbose Linux 5.0.0-37-generic 16 verbose argv "/home/tony/.nvm/versions/node/v8.16.2/bin/node" "/home/tony/.nvm/versions/node/v8.16.2/bin/npm" "start" 17 verbose node v8.16.2 18 verbose npm v6.4.1 19 error code ELIFECYCLE 20 error errno 1 21 error beanclient@1.0.0 prestart: npm run build 21 error Exit status 1 22 error Failed at the beanclient@1.0.0 prestart script. 22 error This is probably not a problem with npm. There is likely additional logging output above. 23 verbose exit [ 1, true ]

MuspelWolf commented 4 years ago

The way i fixed is by adding the -f to the command, i now this wont be the perfect way to do it, but it worked