Closed CyrusVorwald closed 1 year ago
This should be fixed now. Thank you for raising the issue @CyrusVorwald
I still have this issue with the following reproduction steps:
❯ npm install -g @icon-community/drogon
_ .-') _ _ .-') .-') _ ,---.
( ( OO) )( \( -O ) ( OO ) )| |
\ .'_ ,------. .-'),-----. ,----. .-'),-----. ,--./ ,--,' | |
,`'--..._)| /`. '( OO' .-. ' ' .-./-') ( OO' .-. '| \ | |\ | |
| | \ '| / | |/ | | | | | |_( O- )/ | | | || \| | )| |
| | ' || |_.' |\_) | |\| | | | .--, \\_) | |\| || . |/ | .'
| | / :| . '.' \ | | | |(| | '. (_/ \ | | | || |\ | `--'
| '--' /| |\ \ `' '-' ' | '--' | `' '-' '| | \ | .--.
`-------' `--' '--' `-----' `------' `-----' `--' `--' '--'
✔ Name of the project … sample
✔ Do you want to initialize your Drogon project with samples? … no / **yes**
✔ Do you want to generate a keystore for this project? … no / **yes**
(node:74548) UnhandledPromiseRejectionWarning: Error: (HTTP code 404) no such container - No such image: iconcommunity/drogon:latest
at /Users/cyrusvorwald/.nvm/versions/node/v14.17.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:336:17
at getCause (/Users/cyrusvorwald/.nvm/versions/node/v14.17.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:366:7)
at Modem.buildPayload (/Users/cyrusvorwald/.nvm/versions/node/v14.17.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:335:5)
at IncomingMessage.<anonymous> (/Users/cyrusvorwald/.nvm/versions/node/v14.17.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:303:16)
at IncomingMessage.emit (events.js:388:22)
at endReadableNT (internal/streams/readable.js:1336:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:74548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:74548) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
you'll have to first do drogon install
before you can do the init. init
makes sure the necessary images are available locally.
I was not able to do drogon install
. See https://github.com/icon-community/drogon/issues/21 for more on that.
Im having the same issue,
I started running npm install -g @icon-community/drogon
as per the instructions in the README.md.
after that I executed drogon init
this is the result:
fidel@laptop:~/code/js/projects/icon-projects/drogon/01$ drogon init
_ .-') _ _ .-') .-') _ ,---.
( ( OO) )( \( -O ) ( OO ) )| |
\ .'_ ,------. .-'),-----. ,----. .-'),-----. ,--./ ,--,' | |
,`'--..._)| /`. '( OO' .-. ' ' .-./-') ( OO' .-. '| \ | |\ | |
| | \ '| / | |/ | | | | | |_( O- )/ | | | || \| | )| |
| | ' || |_.' |\_) | |\| | | | .--, \\_) | |\| || . |/ | .'
| | / :| . '.' \ | | | |(| | '. (_/ \ | | | || |\ | `--'
| '--' /| |\ \ `' '-' ' | '--' | `' '-' '| | \ | .--.
`-------' `--' '--' `-----' `------' `-----' `--' `--' '--'
✔ Name of the project … test-1
✔ Do you want to initialize your Drogon project with samples? … no / yes
✔ Do you want to generate a keystore for this project? … no / yes
/home/fidel/.nvm/versions/node/v18.13.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:336
var msg = new Error(
^
Error: (HTTP code 404) no such container - No such image: iconcommunity/drogon:latest
at /home/fidel/.nvm/versions/node/v18.13.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:336:17
at getCause (/home/fidel/.nvm/versions/node/v18.13.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:366:7)
at Modem.buildPayload (/home/fidel/.nvm/versions/node/v18.13.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:335:5)
at IncomingMessage.<anonymous> (/home/fidel/.nvm/versions/node/v18.13.0/lib/node_modules/@icon-community/drogon/node_modules/docker-modem/lib/modem.js:303:16)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
reason: 'no such container',
statusCode: 404,
json: { message: 'No such image: iconcommunity/drogon:latest' }
}
Node.js v18.13.0
@CyrusVorwald I see. imho it it s a different issue. Since the pre-requisites are not met, (in this case the docker images which needs to be pulled), the init
command is failing.
Although this error is expected, the UX can be very much improved. I have added an enhancement ticket for this #23.
@FidelVe , I am assuming that perhaps you did not do drogon install
before doing the init
. There was a gap in the documentation with regards to this, added a PR to address the documentation issue #22.
Thank both of you for the bug reports. Im currently closing this issue because the documentation is updated now.
When initializing a project with samples, I get the following error:
fatal Failed to fetch boilerplate. Error: (HTTP code 404) no such container - No such image: drogon:latest
See the full command log below