peterthehan / create-discord-bot

A module-based Discord bot template.
MIT License
164 stars 80 forks source link

npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/peterthehan/create-discord-bot.git #17

Closed Indoraptor1 closed 4 years ago

Indoraptor1 commented 4 years ago

npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno ENOENT npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/peterthehan/create-discord-bot.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

peterthehan commented 4 years ago

Can you provide more context for how you're producing this error?

Indoraptor1 commented 4 years ago

When i want to run the npx peterthehan/create-discord-bot command in node.js command prompt

peterthehan commented 4 years ago

Can you post your git and npm versions?

npm -v
git --version
Indoraptor1 commented 4 years ago

6.13.4 and 2.28.0

peterthehan commented 4 years ago

https://stackoverflow.com/questions/56473680/npm-install-shows-error-with-git-not-found It looks like git might be missing from PATH. I'd recommend reinstalling git following the installation's recommended settings.

peterthehan commented 4 years ago

If you're on windows, I'd also recommend running these scripts on git bash instead of cmd.

Indoraptor1 commented 4 years ago

Hi, I tryed Git bash and now i can dowload but when i want to run it i get this error: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! 744865493189525564@1.0.0 start: node ./src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the 744865493189525564@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

peterthehan commented 4 years ago

Can you post your node version node -v? If there are any additional logs, can you also post them? I'm not sure I can help you given how sparse this error is.

Indoraptor1 commented 4 years ago

0 info it worked if it ends with ok 1 verbose cli [ 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 'start' 1 verbose cli ] 2 info using npm@6.13.4 3 info using node@v12.14.1 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle 744865493189525564@1.0.0~prestart: 744865493189525564@1.0.0 6 info lifecycle 744865493189525564@1.0.0~start: 744865493189525564@1.0.0 7 verbose lifecycle 744865493189525564@1.0.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle 744865493189525564@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;F:\Asztal\Discord.Bot.Maker\projects\borney\BorneyRole\BOT\744865493189525564\node_modules.bin;C:\Users\Zsombor\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Zsombor\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;D:\Oculus\Support\oculus-runtime;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GnuPG\bin;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\QuickTime\QTSystem;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;F:\iDRAC\iSM\shared\bin;F:\iDRAC\iSM\ismeng\bin;F:\iDRAC\iSM\ismmod\bin;C:\Program Files\Git\cmd;C:\Users\Zsombor\AppData\Local\Microsoft\WindowsApps;C:\Users\Zsombor\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Zsombor\AppData\Roaming\npm;C:\Users\Zsombor\AppData\Local\GitHubDesktop\bin;C:\Users\Zsombor\AppData\Local\Microsoft\WindowsApps;F:\iDRAC\iSM\shared\bin;F:\iDRAC\iSM\ismeng\bin;F:\iDRAC\iSM\ismmod\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl 9 verbose lifecycle 744865493189525564@1.0.0~start: CWD: F:\Asztal\Discord.Bot.Maker\projects\borney\BorneyRole\BOT\744865493189525564 10 silly lifecycle 744865493189525564@1.0.0~start: Args: [ '/d /s /c', 'node ./src/index.js' ] 11 silly lifecycle 744865493189525564@1.0.0~start: Returned: code: 1 signal: null 12 info lifecycle 744865493189525564@1.0.0~start: Failed to exec start script 13 verbose stack Error: 744865493189525564@1.0.0 start: node ./src/index.js 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:223:5) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:223:5) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) 14 verbose pkgid 744865493189525564@1.0.0 15 verbose cwd F:\Asztal\Discord.Bot.Maker\projects\borney\BorneyRole\BOT\744865493189525564 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 18 verbose node v12.14.1 19 verbose npm v6.13.4 20 error code ELIFECYCLE 21 error errno 1 22 error 744865493189525564@1.0.0 start: node ./src/index.js 22 error Exit status 1 23 error Failed at the 744865493189525564@1.0.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

peterthehan commented 4 years ago

Try:

  1. npm cache clean --force
  2. Delete the node_modules folder
  3. npm i

And then try running npm start again. Mostly adapted steps found here: https://stackoverflow.com/questions/42308879/how-to-solve-npm-error-npm-err-code-elifecycle

peterthehan commented 4 years ago

I'll close this issue in a bit if you have nothing else.