question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[cloning template failed] npm init wasm-app

See original GitHub issue

I just tried to create an instance of create-wasm-app by executing npm init wasm-app. I was expecting the project initialization to succeed. Instead, I got this error log:

~/Development/accept  npm init wasm-app
npx: installed 1 in 2.048s
cloning the template failed!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
felipecslcommented, Jan 2, 2019

apparently you’re supposed to provide the project name as an argument to npm init, eg.:

$ npm init wasm-app foo
npx: installed 1 in 2.211s
🦀 Rust + 🕸 Wasm = ❤

That seems to work fine, relevant code below:

if (process.argv.length >= 3) {
  folderName = process.argv[2];
  if (!fs.existsSync(folderName)) {
    fs.mkdirSync(folderName);
  }
}

const clone = spawn("git", ["clone", "https://github.com/rustwasm/create-wasm-app.git", folderName]);

Should we update the docs accordingly in order to reflect that? I can send a quick PR.

1reaction
jjpecommented, May 9, 2020

I found that this wasn’t working for me because I had git configured to use a proxy. Running git config --global --unset http.proxy before npm init wasm-app www fixed it for me.

FWIW, I don’t think that’s the core issue, since I’ve have never had git configured to use a proxy.

The script for cloning the project is fairly simple.

Given the fact that this bug has existed since 2018 and still isn’t fixed, I have to disagree with that assessment. It may look simple, but if it really was then the issue would have been fixed long ago. Rather it looks like there’s some subtleties that are being overlooked somehow.

It also reminds me of the recently-introduced term builder gloves.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Conway's Game of Life in Rust and WebAssembly
npm init wasm -app www npx: installed 1 in 1.027s cloning the template failed! I see that this error message was added to...
Read more >
failed to load wasm application - Stack Overflow
wasm file with .js scripts created by the wasm-pack tool. I tested the project locally with npm and node.js and everything worked fine....
Read more >
Compiling from Rust to WebAssembly - MDN Web Docs
This tutorial takes you through all you need to know to compile a Rust project to wasm and use it in an existing...
Read more >
Rust And WebAssembly - wasm-pack
wasm -pack makes JavaScript, Rust based WebAssembly applications should be interoperable ... The above command download, compile, and install the wasm-pack .
Read more >
Host and deploy ASP.NET Core Blazor WebAssembly
js ) fails, try using the unminified version ( decode.js ) instead. Update the app to use the decoder. In the wwwroot/index.html file,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found