Skip to content
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

npm/yarn create @metamask/snap failed: Init Error: Failed to create template #1577

Closed
Vivomo opened this issue Jul 11, 2023 · 2 comments
Closed

Comments

@Vivomo
Copy link

Vivomo commented Jul 11, 2023

When I install @metamask/create-snap, I followed the doc of Metamask snap.
I tried to use this commands, but it all failed and outputed the same error info.

command

yarn create @metamask/snap your-snap-name, npmcreate @metamask/snap your-snap-name and npx @metamask/snap your-snap-name

Error info

***\node_modules\@metamask\create-snap\dist\cmds\init\initHandler.js:47
        throw new Error('Init Error: Failed to create template.');
              ^

Error: Init Error: Failed to create template.
    at initHandler (****\node_modules\@metamask\create-snap\dist\cmds\init\initHandler.js:47:15)

Error log

39 verbose stack Error: command failed
39 verbose stack     at ChildProcess.<anonymous> (****\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:53:27)
39 verbose stack     at ChildProcess.emit (node:events:513:28)
39 verbose stack     at maybeClose (node:internal/child_process:1091:16)
39 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
40 verbose cwd ****
41 verbose Windows_NT 10.0.18362
42 verbose node v18.16.0
43 verbose npm  v9.5.1
44 error code 1

I replaced file path with ****.

@Vivomo Vivomo closed this as completed Jul 12, 2023
@Vivomo
Copy link
Author

Vivomo commented Jul 12, 2023

I resoved it by clean npm cache

@paulfears
Copy link

Also breaks on windows if there is a space in the path

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

No branches or pull requests

2 participants