Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Degit execution does not work #70

Closed
masterl opened this issue Oct 6, 2019 · 9 comments
Closed

Degit execution does not work #70

masterl opened this issue Oct 6, 2019 · 9 comments

Comments

@masterl
Copy link

masterl commented Oct 6, 2019

Doc says to just run degit sveltejs/template svelte-app

Results:

$ degit sveltejs/template svelte-app
! could not find commit hash for master

EDIT:
OS: Linux Manjaro 18.1.0 Juhraya
Git is installed and I use it everyday without any problems.
git version 2.23.0
Node: v12.9.1
NPM: 6.11.2
Degit: 2.1.4

@masterl
Copy link
Author

masterl commented Oct 6, 2019

Cloning manually works, though.

@squeal
Copy link

squeal commented Oct 6, 2019

Hi,
this is not an issue with svelte, nor this template, see here for further info and hints: Rich-Harris/degit#37
If nothing in there solves your issue, join the discussion there :)
And please close the issue here. Thanks.

@masterl
Copy link
Author

masterl commented Oct 7, 2019

That has nothing to do with the error I got.
I'm on Linux, not on mac.
Git is installed and I use it everyday.

I'll add these info on the first comment.

@masterl
Copy link
Author

masterl commented Oct 7, 2019

Oh, now I got what you meant.
Since it's an error on degit, I should discuss there. Ok.

But even so, the docs could be improved regarding this.

@masterl masterl closed this as completed Oct 7, 2019
@squeal
Copy link

squeal commented Oct 7, 2019

Yeah, the readme could mention that, agreed.

@paladinu
Copy link

paladinu commented Jan 9, 2020

For what it's worth, I was having the same error and it turned out to be my employer's MITM SSL decryption cert. I was able to get around it by temporarily disabling ssl check with this:
npm config set strict-ssl false
Although now I am getting "! could not download https://github.com/sveltejs/template/archive/4b6ab60fe58c8404d674b58faa08659d832605cc.tar.gz" presumably because whatever is being used to download is also doing an certificate validation.

@justingolden21
Copy link

I'm getting this when trying to run npx degit sveltejs/template my-svelte-project

Microsoft Windows [Version 10.0.19042.1110]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Justin\Documents>mkdir "svelte test"

C:\Users\Justin\Documents>cd "svelte test"

C:\Users\Justin\Documents\svelte test>npx degit sveltejs/template my-svelte-project
Need to install the following packages:
  degit
Ok to proceed? (y) y
> cloned sveltejs/template#HEAD to my-svelte-project

C:\Users\Justin\Documents\svelte test>npx degit sveltejs/template my-svelte-project
! destination directory is not empty, aborting. Use --force to override
npm ERR! code 1
npm ERR! path C:\Users\Justin\Documents\svelte test
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c degit sveltejs/template my-svelte-project

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Justin\AppData\Local\npm-cache\_logs\2021-08-07T04_48_04_216Z-debug.log

C:\Users\Justin\Documents\svelte test>

@justingolden21
Copy link

0 verbose cli [
0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli   'C:\\Users\\Justin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli   'exec',
0 verbose cli   '--',
0 verbose cli   'degit',
0 verbose cli   'sveltejs/template',
0 verbose cli   'my-svelte-project'
0 verbose cli ]
1 info using npm@7.5.4
2 info using node@v14.15.5
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:C:\Users\Justin\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:project Completed in 1ms
9 timing config:load:file:C:\Users\Justin\.npmrc Completed in 0ms
10 timing config:load:user Completed in 0ms
11 timing config:load:file:C:\Users\Justin\AppData\Roaming\npm\etc\npmrc Completed in 1ms
12 timing config:load:global Completed in 1ms
13 timing config:load:cafile Completed in 0ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:setUserAgent Completed in 0ms
16 timing config:load:setEnvs Completed in 0ms
17 timing config:load Completed in 8ms
18 verbose npm-session ef98f26660729f42
19 timing npm:load Completed in 18ms
20 http fetch GET 304 https://registry.npmjs.org/degit 299ms (from cache)
21 timing arborist:ctor Completed in 1ms
22 timing arborist:ctor Completed in 0ms
23 timing arborist:ctor Completed in 0ms
24 timing command:exec Completed in 656ms
25 verbose stack Error: command failed
25 verbose stack     at ChildProcess.<anonymous> (C:\Users\Justin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
25 verbose stack     at ChildProcess.emit (events.js:315:20)
25 verbose stack     at maybeClose (internal/child_process.js:1048:16)
25 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
26 verbose pkgid Justin@1.0.0
27 verbose cwd C:\Users\Justin\Documents\svelte test
28 verbose Windows_NT 10.0.19042
29 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Justin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "exec" "--" "degit" "sveltejs/template" "my-svelte-project"
30 verbose node v14.15.5
31 verbose npm  v7.5.4
32 error code 1
33 error path C:\Users\Justin\Documents\svelte test
34 error command failed
35 error command C:\WINDOWS\system32\cmd.exe /d /s /c degit sveltejs/template my-svelte-project
36 verbose exit 1

here's the log

@paiva-thiago
Copy link

It seems to be something related to security issues.

I've made an npm install -g degit and after degit username/project and it worked!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants