I am trying the following tutorial to investigate WebAssembly with Rust.
https://rustwasm.github.io/docs/book/game-of-life/hello-world.html
However, when I run "npm init wasm-app www" in section 4.2, I get the error in the attached image. Please let me know how to deal with it.
jjpe
June 24, 2023, 9:31pm
2
The error suggests it's git clone
that fails. Do you already have a www
dir in your project dir? If so, that would prevent git clone from completing successfully.
Thanks for the reply.
I created an empty directory and ran the same command but got the same error...
jjpe
June 24, 2023, 9:56pm
4
That's pretty odd.
I just double checked, the repo exists .
Could you post the contents of the log file mentioned by the error?
I'll paste the error log.
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@9.7.2
2 info using node@v18.13.0
3 timing npm:load:whichnode Completed in 3ms
4 timing config:load:defaults Completed in 4ms
5 timing config:load:file:C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\P-254\Projects\WebAssembly\tmp\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\P-254\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\P-254\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 14ms
17 timing npm:load:configload Completed in 14ms
18 timing config:load:flatten Completed in 2ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 1ms
21 verbose title npm init wasm-app www
22 verbose argv "init" "wasm-app" "www"
23 timing npm:load:setTitle Completed in 1ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-24T21_47_19_538Z-
26 verbose logfile C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-24T21_47_19_538Z-debug-0.log
27 timing npm:load:logFile Completed in 17ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 58ms
31 timing arborist:ctor Completed in 0ms
32 silly logfile start cleaning logs, removing 2 files
33 silly logfile done cleaning log files
34 http fetch GET 200 https://registry.npmjs.org/create-wasm-app 123ms (cache revalidated)
35 timing arborist:ctor Completed in 0ms
36 timing arborist:ctor Completed in 0ms
37 timing command:init Completed in 261ms
38 verbose stack Error: command failed
38 verbose stack at ChildProcess.<anonymous> (C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:53:27)
38 verbose stack at ChildProcess.emit (node:events:513:28)
38 verbose stack at maybeClose (node:internal/child_process:1091:16)
38 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
39 verbose cwd C:\Users\P-254\Projects\WebAssembly\tmp
40 verbose Windows_NT 10.0.19045
41 verbose node v18.13.0
42 verbose npm v9.7.2
43 error code 1
44 error path C:\Users\P-254\Projects\WebAssembly\tmp
45 error command failed
46 error command C:\WINDOWS\system32\cmd.exe /d /s /c create-wasm-app www
47 verbose exit 1
48 timing npm Completed in 621ms
49 verbose code 1
50 error A complete log of this run can be found in: C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-24T21_47_19_538Z-debug-0.log
hax10
June 25, 2023, 12:52am
6
This is just a hunch, but you're running Node v18. Try downgrading to v16 and see if it works. I've had enough trouble with v18 that I still haven't bothered upgrading.
(If I recall correctly, v18 has problems with SSL/TLS connections, which could be preventing the download from GitHub happening).
I have tried downgrading Node.js to v16.20.1 and get the same error.
hax10
June 25, 2023, 1:22am
8
Do you mind posting the new error log?
I will paste new log.
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@9.7.2
2 info using node@v16.20.1
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 4ms
5 timing config:load:file:C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\P-254\Projects\WebAssembly\wasm-game-of-life\.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\P-254\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\P-254\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 13ms
17 timing npm:load:configload Completed in 13ms
18 timing config:load:flatten Completed in 2ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 1ms
21 verbose title npm init wasm-app www
22 verbose argv "init" "wasm-app" "www"
23 timing npm:load:setTitle Completed in 0ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-25T01_36_03_373Z-
26 verbose logfile C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-25T01_36_03_373Z-debug-0.log
27 timing npm:load:logFile Completed in 18ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 57ms
31 timing arborist:ctor Completed in 1ms
32 silly logfile start cleaning logs, removing 2 files
33 silly logfile done cleaning log files
34 http fetch GET 200 https://registry.npmjs.org/create-wasm-app 697ms (cache revalidated)
35 timing arborist:ctor Completed in 0ms
36 timing arborist:ctor Completed in 0ms
37 timing command:init Completed in 855ms
38 verbose stack Error: command failed
38 verbose stack at ChildProcess.<anonymous> (C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:53:27)
38 verbose stack at ChildProcess.emit (node:events:513:28)
38 verbose stack at maybeClose (node:internal/child_process:1100:16)
38 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
39 verbose cwd C:\Users\P-254\Projects\WebAssembly\wasm-game-of-life
40 verbose Windows_NT 10.0.19045
41 verbose node v16.20.1
42 verbose npm v9.7.2
43 error code 1
44 error path C:\Users\P-254\Projects\WebAssembly\wasm-game-of-life
45 error command failed
46 error command C:\WINDOWS\system32\cmd.exe /d /s /c create-wasm-app www
47 verbose exit 1
48 timing npm Completed in 1208ms
49 verbose code 1
50 error A complete log of this run can be found in: C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-25T01_36_03_373Z-debug-0.log
hax10
June 25, 2023, 1:47am
10
After looking at this similar problem
opened 02:16AM - 19 Apr 22 UTC
bug
**Checklist**
- Have you pulled and found the error with `jc21/nginx-proxy-mana… ger:latest` docker image?
- Yes
- Are you sure you're not using someone else's docker image?
- Yes
- Have you searched for similar issues (both open and closed)?
- Yes
**Describe the bug**
i have a fresh NPM image running and tried to generate SSL certificate for my domain
i tried both http/dns challenges
for http challenge i get this error:
```
Communication with the API failed, is NPM running correctly?
```
or this one:
```
example.example.com: There is no server available at this domain. Please make sure your domain exists and points to the IP where your NPM instance is running and if necessary port 80 is forwarded in your router.
```
for the second error i made sure my DNS record is configured as DNS only and not proxied on cloudflare and i have both port 80 and 443 forwarded on my WAN router
if i opted for DNS challenge i get this error
```
Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-3" --agree-tos --email "xxxx@gmail.com" --domains "example.com" --authenticator dns-cloudflare --dns-cloudflare-credentials "/etc/letsencrypt/credentials/credentials-3" --dns-cloudflare-propagation-seconds 240
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Encountered CloudFlareAPIError adding TXT record: 10000 Authentication error
Error communicating with the Cloudflare API: Authentication error
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
at ChildProcess.exithandler (node:child_process:397:12)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
```
although the API key is working fine
```
curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer xxxx" \
-H "Content-Type:application/json"
{"result":{"id":"96ec8dc212843213fb16d363732e6b34","status":"active"},"success":true,"errors":[],"messages":[{"code":10000,"message":"This API Token is valid and active","type":null}]}
```
**Nginx Proxy Manager Version**
v2.9.14
i tried the latest as well but i had the same issue and i saw a post here recommending downgrading helped but unfortunately it didn't help me ref. https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1862
**To Reproduce**
Steps to reproduce the behavior:
- Go to the tab "SSL Certificates"
- Click on "Add SSL Certificate"
- Enter the domains "*.example.com, example.com"
- Select "Use DNS Challenge", Cloudflare, and set API Key
- Set Propagation Seconds (450 Seconds) (Optional)
**Expected behavior**
wildcard SSL certificate to be created
**Operating System**
ubuntu server 21.10
I'm wondering if it's caused by Windows Firewall and/or an antivirus program? Can you try disabling these and trying again? It does look like the download is failing for some reason.
I disabled the Firewall and anti-virus software and tried again, but the error still occurs.
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@9.7.2
2 info using node@v16.20.1
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 4ms
5 timing config:load:file:C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\P-254\Projects\WebAssembly\wasm-game-of-life\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\P-254\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\P-254\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 14ms
17 timing npm:load:configload Completed in 14ms
18 timing config:load:flatten Completed in 2ms
19 timing npm:load:mkdirpcache Completed in 1ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm init wasm-app www
22 verbose argv "init" "wasm-app" "www"
23 timing npm:load:setTitle Completed in 1ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-25T02_30_32_697Z-
26 verbose logfile C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-25T02_30_32_697Z-debug-0.log
27 timing npm:load:logFile Completed in 18ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 60ms
31 timing arborist:ctor Completed in 1ms
32 silly logfile start cleaning logs, removing 2 files
33 silly logfile done cleaning log files
34 http fetch GET 200 https://registry.npmjs.org/create-wasm-app 665ms (cache revalidated)
35 timing arborist:ctor Completed in 1ms
36 timing arborist:ctor Completed in 0ms
37 timing command:init Completed in 810ms
38 verbose stack Error: command failed
38 verbose stack at ChildProcess.<anonymous> (C:\Users\P-254\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:53:27)
38 verbose stack at ChildProcess.emit (node:events:513:28)
38 verbose stack at maybeClose (node:internal/child_process:1100:16)
38 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
39 verbose cwd C:\Users\P-254\Projects\WebAssembly\wasm-game-of-life
40 verbose Windows_NT 10.0.19045
41 verbose node v16.20.1
42 verbose npm v9.7.2
43 error code 1
44 error path C:\Users\P-254\Projects\WebAssembly\wasm-game-of-life
45 error command failed
46 error command C:\WINDOWS\system32\cmd.exe /d /s /c create-wasm-app www
47 verbose exit 1
48 timing npm Completed in 1159ms
49 verbose code 1
50 error A complete log of this run can be found in: C:\Users\P-254\AppData\Local\npm-cache\_logs\2023-06-25T02_30_32_697Z-debug-0.log
hax10
June 25, 2023, 2:52am
12
From the command line, can you successfully run this command: git clone https://github.com/rustwasm/create-wasm-app.git
Also, perhaps try running the terminal as Administrator and see if that works?
I ran the command, but it did not recognize git as a command. I usually use git in SourceTree, so perhaps it is not in the path. I am not sure, but there is no mention of installing GIT in the tutorial setup, do I need to do that?
hax10
June 25, 2023, 3:28am
14
Yeah, the NPM script calls git
, so you should install it and make sure it is accessible from the PATH variable. If you have SourceTree, it should be installed already, but may not be on the PATH.
I think you're right that the tutorial doesn't mention installing git
, but unfortunately git
is so widely used now that documentation often assumes you have it already.
2 Likes
I ran the command through the path to git.exe (setting the environment variable) and npm init wasm-app www
now succeeds. Thank you very much for your kind reply.
system
Closed
September 23, 2023, 3:32am
17
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.