Install for create-charge-card-worker@latest failed with code 1

Hi,

I am following the Tutorial https://docs.camunda.org/get-started/quick-start/service-task/#b-using-javascript-nodejs
When I type this : npm init charge-card-worker -y

I get an error.
C:\Users\cet\Documents\charge-card-worker>npm init charge-card-worker -y
npm ERR! code E404
npm ERR! 404 Not Found: create-charge-card-worker@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\christian\AppData\Roaming\npm-cache_logs\2018-11-27T10_22_38_936Z-debug.log
Install for create-charge-card-worker@latest failed with code 1

The log shows this

0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘install’,
1 verbose cli ‘create-charge-card-worker@latest’,
1 verbose cli ‘–global’,
1 verbose cli ‘–prefix’,
1 verbose cli ‘C:\Users\christian\AppData\Roaming\npm-cache\_npx\9008’,
1 verbose cli ‘–loglevel’,
1 verbose cli ‘error’,
1 verbose cli ‘–json’ ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose npm-session df8fc29e494d890f
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/create-charge-card-worker 759ms
8 silly fetchPackageMetaData error for create-charge-card-worker@latest 404 Not Found: create-charge-card-worker@latest
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 4003ms
11 verbose stack Error: 404 Not Found: create-charge-card-worker@latest
11 verbose stack at fetch.then.res (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
11 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
11 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
11 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
11 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
11 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
11 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
11 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
11 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
11 verbose stack at runCallback (timers.js:705:18)
11 verbose stack at tryOnImmediate (timers.js:676:5)
11 verbose stack at processImmediate (timers.js:658:5)
12 verbose cwd C:\Users\christian\Documents\charge-card-worker
13 verbose Windows_NT 6.1.7601
14 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “create-charge-card-worker@latest” “–global” “–prefix” “C:\Users\christian\AppData\Roaming\npm-cache\_npx\9008” “–loglevel” “error” “–json”
15 verbose node v10.13.0
16 verbose npm v6.4.1
17 error code E404
18 error 404 Not Found: create-charge-card-worker@latest
19 verbose exit [ 1, true ]

Regards.

Hi,

You can try to execute npm init --yes or create the package.json manually.

Hi,

I tried your suggestion and that’s what it display :

C:\Users\christitet\Documents\charge-card-worker>npm init --yes
Wrote to C:\Users\citet\Documents\charge-card-worker\package.json:

{
“name”: “charge-card-worker”,
“version”: “1.0.0”,
“description”: “”,
“main”: “index.js”,
“dependencies”: {
“camunda-external-task-client-js”: “^1.1.1”
},
“devDependencies”: {},
“scripts”: {
“test”: “echo “Error: no test specified” && exit 1”
},
“keywords”: [],
“author”: “”,
“license”: “ISC”
}

Is this the expected behaviour ? I don’t know how to create the package.json manually. Any suggestion ?

Regards.

This looks good.
You can check an example of the package.json file if you download the source of Step-2b.
Just scroll at the bottom of the page and click on the download button.

Thank you. It is working.