qwik icon indicating copy to clipboard operation
qwik copied to clipboard

[๐Ÿž] `pnpm create qwik@latest` asks to install dependencies but does not install themm

Open sarvex opened this issue 1 year ago โ€ข 5 comments

Which component is affected?

Qwik Runtime

Describe the bug

Let's create a Qwik App โœจ (v1.1.1) โ”‚ โ—‡ Where would you like to create your new project? (Use '.' or './' for current directory) โ”‚ ./qwik-app โ”‚ โ— Creating new project in D:\Source\qwik-app ... ๐Ÿ‡ โ”‚ โ—‡ Select a starter โ”‚ Basic App (QwikCity) โ”‚ โ—‡ Would you like to install pnpm dependencies? โ”‚ Yes โ”‚ โ—‡ Initialize a new git repository? โ”‚ Yes โ”‚ โ—‡ Created App ๐Ÿฐ โ”‚ โ—‡ Git initialized ๐ŸŽฒ โ”‚ โ—‡ Failed to install dependencies ๐Ÿ“‹

Reproduction

https://stackblitz.com/edit/qwik-starter

Steps to reproduce

pnpm create qwik@latest

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 1012.99 MB / 15.77 GB
  Binaries:
    Node: 20.1.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.5.1 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.6.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1702.0), Chromium (113.0.1774.35)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @builder.io/qwik: ^1.1.1 => 1.1.1
    @builder.io/qwik-city: ^1.1.1 => 1.1.1
    undici: 5.22.0 => 5.22.0
    vite: 4.3.5 => 4.3.5

Additional Information

No response

sarvex avatar May 12 '23 15:05 sarvex

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

stackblitz[bot] avatar May 12 '23 15:05 stackblitz[bot]

Same problem here

0xS4D avatar May 12 '23 15:05 0xS4D

do you get the error message of why it failed to install dependencies?

manucorporat avatar May 12 '23 17:05 manucorporat

This isn't the fix, but it should help log any errors we're not seeing: https://github.com/BuilderIO/qwik/pull/4187

adamdbradley avatar May 12 '23 18:05 adamdbradley

do you get the error message of why it failed to install dependencies?

@manucorporat I do not get any error

This isn't the fix, but it should help log any errors we're not seeing: https://github.com/BuilderIO/qwik/pull/4187

@adamdbradley Shall I merge this in my personal fork and try again?

sarvex avatar May 13 '23 01:05 sarvex

Can you try again in 1.1.2? it should print the error message!

manucorporat avatar May 14 '23 07:05 manucorporat

โ”‚
โ—‹  Installing pnpm dependencies
โ”‚
โ–   EXDEV: cross-device link not permitted, rename 'C:\Users\Yoga\AppData\Local\Temp\create-qwik-1axyk132in9\node_modules' -> 'D:\Source\test-app\node_modules'
โ”‚
โ”‚
โ”‚
โ–    pnpm install failed
โ”‚   You might need to run "pnpm install" manually inside the root of the project.
โ”‚
โ—‡  Failed to install pnpm dependencies ๐Ÿ“‹

sarvex avatar May 14 '23 11:05 sarvex

Ok! This gives me an idea of whatโ€™s going on!! We should be able to fix it in next release

manucorporat avatar May 14 '23 13:05 manucorporat

Facing same issue with npm (v9.6.6) (OS: Archlinux)

โ—‡  App Created ๐Ÿฐโ”‚
โ—’  Installing npm dependencies...   
โ”‚
โ–   EXDEV: cross-device link not permitted, rename '/tmp/create-qwik-1xy4rohj08f/node_modules' -> '/home/krishna/Code/Qwik/deno-qwik-login-app/node_modules'
โ”‚  
โ”‚  
โ”‚
โ–    npm install failed 
โ”‚   You might need to run "npm install" manually inside the root of the project.
โ”‚
โ—‡  Failed to install npm dependencies ๐Ÿ“‹

krishna-santosh avatar Jul 06 '23 15:07 krishna-santosh

Any Linux dev system running systemd (probably most) will fail with this because tmpfs is in RAM and you can't perform a move from one device to another, since move/rename is supposed to be atomic.

In the case of cross-device like this, the cli will need to copy and remove the original instead.

Same for scenarios like the one in this issue with the temp/store on a different drive from the project in Windows, etc.

jordanw66 avatar Jul 06 '23 15:07 jordanw66

@jordanw66 even windows users are facing the problem because of pnpm store is not under the project.

The first run of pnpm fails on Windows as the store is linked to the temp folder and asks to recreate the whole node_modules directory.

ERR_PNPM_UNEXPECTED_VIRTUAL_STOREโ€‰ Unexpected virtual store location

The dependencies at "C:\Users\Yoga\Sources\qwik-app\node_modules" are currently symlinked from the virtual store directory at "C:\Users\Yoga\AppData\Local\Temp\create-qwik-1x4j7iljd2b\node_modules\.pnpm".

pnpm now wants to use the virtual store at "C:\Users\Yoga\Sources\qwik-app\node_modules\.pnpm" to link dependencies from the store.

If you want to use the new virtual store location, reinstall your dependencies with "pnpm install".

You may change the virtual store location by changing the value of the virtual-store-dir config.

@manucorporat we need to change the location to the sub-folder of the project.

sarvex avatar Jul 07 '23 12:07 sarvex

Same issue with Yarn:

โ—‹  Installing yarn dependencies
โ”‚
โ–   EXDEV: cross-device link not permitted, rename '/tmp/create-qwik-y69244vbbi/node_modules' -> '/home/ian/Projects/tmp/yarn-workspaces/apps/qwik-app/node_modules'
โ”‚
โ”‚
โ”‚
โ–    yarn install failed
โ”‚   You might need to run "yarn install" manually inside the root of the project.

System info:

OS: Arch Linux x86_64
Kernel: 6.4.11-arch2-1
Yarn: 4.0.0-rc.50
Node: v20.5.1

ianlet avatar Aug 27 '23 13:08 ianlet

@ianlet are you using the latest version of Qwik?

gioboa avatar Aug 27 '23 13:08 gioboa

@ianlet are you using the latest version of Qwik?

Yes, sorry I forgot to mention it:

@builder.io/qwik: 1.2.10
@builder.io/qwik-city: 1.2.10
vite: 4.4.7
undici: 5.1.6

ianlet avatar Aug 27 '23 13:08 ianlet

Hi @ianlet Just a quick question: when u run the install w/o selecting the install dependencies option and then cd into the app dir, would it then successfully install w/o errors?

zanettin avatar Aug 27 '23 20:08 zanettin

Hi @zanettin Yes, in my case it does install without errors.

ianlet avatar Aug 27 '23 21:08 ianlet

I just tested the latest version, and all dependencies installed as expected for npm and pnpm but fail for yarn

Closing this issue in favor of https://github.com/BuilderIO/qwik/issues/5045

mhevery avatar Aug 28 '23 17:08 mhevery

Sry to reopen this one @mhevery . I assume the problem on this issue is the background install which starts to download the npm packages as early as possible and moves them then into the final dir. the issue you linked is caused by the fact, that yarn create qwik@latest doesn't exist. but yarn create qwik works as expected ๐Ÿ‘ (https://qwik.builder.io/docs/getting-started/#create-an-app-using-the-cli)

zanettin avatar Aug 28 '23 18:08 zanettin

I'm running into this too @zanettin - just trying to run bun create qwik@latest as is on the website and I'm getting the following issue: EXDEV: cross-device link not permitted, rename '/var/folders/7c/c396xbkd7sbbj_5zz4mk1nlr0000gn/T/create-qwik-u5d7s6a9ia/node_modules' -> '/.../node_modules'

Any help would be much appreciated.

karthikjn01 avatar Dec 23 '23 18:12 karthikjn01

Just to expand a bit from the previous comment - I tried bun, npm and yarn all coming up with the same issue.

karthikjn01 avatar Dec 23 '23 18:12 karthikjn01

So I ended up fixing the issue with:

npm install fs-extra then

node -e "require('fs-extra').move('/var/folders/7c/c396xbkd7sbbj_5zz4mk1nlr0000gn/T/create-qwik-1rnvb666kff/node_modules', '/Volumes/Primary/Code/.../.../node_modules', { overwrite: true }, console.log)"

No idea what the original issue was but thanks perplexity.ai for the fix ๐Ÿ˜‚

karthikjn01 avatar Dec 23 '23 23:12 karthikjn01

Facing same issue with node(20.11.0), npm(10.2.4), Ubuntu 22.04

npm create qwik@latest


โ”Œ  Let's create a  Qwik App  โœจ (v1.3.5)
โ”‚
โ—‡  Where would you like to create your new project? (Use '.' or './' for current directory)
โ”‚  ./qwik_test
โ”‚
โ—  Creating new project in  /media/files/ws/qwik/qwik_test  ... ๐Ÿ‡
โ”‚
โ—‡  Select a starter
โ”‚  Basic App (Qwik City + Qwik)
โ”‚
โ—‡  Would you like to install npm dependencies?
โ”‚  Yes
โ”‚
โ—‡  Initialize a new git repository?
โ”‚  Yes
โ”‚
โ—‡  Finishing the install. Wanna hear a joke?
โ”‚  Yes
โ”‚
โ—‡  ๐Ÿ™ˆ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                            โ”‚
โ”‚  What do you do when you see a space man?  โ”‚
โ”‚  Park your car, man.                       โ”‚
โ”‚                                            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡  App Created ๐Ÿฐ
โ”‚
โ—‡  Git initialized ๐ŸŽฒ
โ”‚
โ—’  Installing npm dependenciesโ”‚
โ–   EXDEV: cross-device link not permitted, rename '/tmp/create-qwik-rmf4tc4dvi/node_modules' -> '/media/files/ws/qwik/qwik_test/node_modules'
โ”‚  
โ”‚  
โ”‚
โ–    npm install failed 
โ”‚   You might need to run "npm install" manually inside the root of the project.
โ”‚  
โ”‚  
โ—‡  Failed to install npm dependencies ๐Ÿ“‹

If set "No" for "Would you like to install npm dependencies?" app created successfully.

igolskyi avatar Jan 18 '24 16:01 igolskyi

I just tested the latest version, and all dependencies installed as expected. So I'm closing this issue for now, feel free to re-open it if it's still an issue for you.

gioboa avatar Jun 14 '24 14:06 gioboa