workers-rs icon indicating copy to clipboard operation
workers-rs copied to clipboard

[BUG] npm init cloudflare fails

Open vincentserpoul opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What version of workers-rs are you using?

main

Describe the bug

when I do:

npm init cloudflare project_name worker-rust

I get an error:

Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

Error: EXDEV: cross-device link not permitted, rename '/tmp/2122340072f1d-91d055235fe5d/worker-rust' -> '/home/xxx/project_name'

npm ERR! code 1

Steps To Reproduce

linux 6.0.11-arch1-1 npm 9.2.0 run npm init cloudflare project_name worker-rust

vincentserpoul avatar Dec 11 '22 04:12 vincentserpoul

Any workaround for this?

Ponjimon avatar Feb 24 '23 12:02 Ponjimon

I had the same issue. What I did to get past this, was a manual copy of the template. At this point, the template has been downloaded already when npm init was run. So you can just copy it.

An example using the above error output: mv /tmp/2122340072f1d-91d055235fe5d/worker-rust -> /home/xxx/project_name

auyer avatar Apr 10 '23 18:04 auyer

Another thing that is happening when running this command not exactly related to this issue but in the similar domain
npm init cloudflare project_name worker-rust > common worker function is that it just creates js default template instead of Rust one.

Anyone experiencing this as well ?

frontmesh avatar Jun 17 '23 12:06 frontmesh

@frontmesh Yes, I'm also experiencing this...

oldmanfleming avatar Jul 21 '23 15:07 oldmanfleming