-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cloning template failed] npm init wasm-app #44
Comments
Do you have |
Of course! What kind of dev doesn't these days? :) |
same problem |
apparently you're supposed to provide the project name as an argument to
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. |
@tushartyagi Looks like cloning the template fails if the directory exists.
|
I also encountered this issue and thought I'd share what I found. When trying to run the command from the terminal in vscode I got the same error, but when running it from git bash it worked successfully. I've had issues cloning from certain repos before because of TLS issues on Windows and the version of Git I was using. The Git version in vscode is older then the version I have for Git bash. Not sure if this is the cause or not, but here's the output from both cases if anyone is looking into this.
|
I found that this wasn't working for me because I had git configured to use a proxy. Running |
I've made a pull request to display the error messages from git (since git is used in the implementation of |
I am having all kinds of issues with this. What am I doing wrong?: Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
internal/fs/utils.js:461
throw err;
^
Error: ENFILE: file table overflow, open '/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/package.json'
at Object.openSync (fs.js:431:3)
at Object.readFileSync (fs.js:333:35)
at Object.Module._extensions..json (internal/modules/cjs/loader.js:791:22)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/config.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10) {
errno: -23,
syscall: 'open',
code: 'ENFILE',
path: '/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/package.json'
}
Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
(libuv) kqueue(): Too many open files in system
tty.js:89
throw new ERR_TTY_INIT_FAILED(ctx);
^
SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow)
at new WriteStream (tty.js:89:11)
at createWritableStdioStream (internal/process/stdio.js:155:16)
at process.getStdout [as stdout] (internal/process/stdio.js:28:14)
at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
(libuv) kqueue(): Too many open files in system
tty.js:89
throw new ERR_TTY_INIT_FAILED(ctx);
^
SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow)
at new WriteStream (tty.js:89:11)
at createWritableStdioStream (internal/process/stdio.js:155:16)
at process.getStdout [as stdout] (internal/process/stdio.js:28:14)
at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
(libuv) kqueue(): Too many open files in system
tty.js:89
throw new ERR_TTY_INIT_FAILED(ctx);
^
SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow)
at new WriteStream (tty.js:89:11)
at createWritableStdioStream (internal/process/stdio.js:155:16)
at process.getStdout [as stdout] (internal/process/stdio.js:28:14)
at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
(libuv) kqueue(): Too many open files in system
tty.js:89
throw new ERR_TTY_INIT_FAILED(ctx);
^
SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow)
at new WriteStream (tty.js:89:11)
at createWritableStdioStream (internal/process/stdio.js:155:16)
at process.getStdout [as stdout] (internal/process/stdio.js:28:14)
at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
(libuv) kqueue(): Too many open files in system
tty.js:89
throw new ERR_TTY_INIT_FAILED(ctx);
^
SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow)
at new WriteStream (tty.js:89:11)
at createWritableStdioStream (internal/process/stdio.js:155:16)
at process.getStdout [as stdout] (internal/process/stdio.js:28:14)
at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
Jims-MacBook-Pro:www jhessin$ ls
Jims-MacBook-Pro:www jhessin$ npm init wasm-app www
spawn /bin/sh ENFILE
Jims-MacBook-Pro:www jhessin$ npm -v && node -v
6.9.0
v12.3.1 |
@jhessin try running |
I don't mean to bash anyone, especially not the devs of this project, but the fact that this seemingly trivial issue seems to be causing so much pain to so many people might be an indication that the CLI command's current terminal interface is far from intuitive, and likely to be suboptimal. From first principles, it both surprises and bugs me that this is somehow tied up into Compare this to using e.g. Cargo, which Just Works(tm) generally speaking. Meanwhile I'm fairly certain that what cargo does is far more complex than the rustwasm project creation CLI command that seems to be causing so much confusion and pain. |
Running this
The script for cloning the project is fairly simple. Compare it to the slightly more complicated create-express-api. It may be performing a simple task, but because of the way that |
Looks like |
Had the same issue - just like RKennedy9064 commented, updating git (from 1.7.x to 2.26.2) fixed the issue for me. |
FWIW, I don't think that's the core issue, since I've have never had git configured to use a proxy.
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. |
`npm init wasm-app www`実行時のエラー解消のため refs. rustwasm/create-wasm-app#44 (comment)
I just tried to create an instance of
create-wasm-app
by executingnpm init wasm-app
.I was expecting the project initialization to succeed.
Instead, I got this error log:
The text was updated successfully, but these errors were encountered: