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

[bug] Error while created by pnpm. #89

Closed
timongh opened this issue Jul 24, 2022 · 10 comments
Closed

[bug] Error while created by pnpm. #89

timongh opened this issue Jul 24, 2022 · 10 comments

Comments

@timongh
Copy link

timongh commented Jul 24, 2022

Describe the bug

An error occurred while creating creating a project.

Reproduction

pnpm create tauri-app

Platform and versions

OS: Windows 10 x64
Node.js: 16.16.0
npm: 8.11.0
pnpm: 7.6.0
rustup: 1.24.3
rustc: 1.60.0
cargo: 1.60.0
Rust toolchain: stable-x86_64-pc-windows-msvc

Stack trace

ERROR  Error: command failed: pnpm install --reporter silent --shamefully-hoist
Error: command failed: pnpm install --reporter silent --shamefully-hoist
    at ChildProcess.<anonymous> (D:\npm\cache\_npx\18fcca21cf4d8fd7\node_modules\@vue\cli\lib\util\executeCommand.js:138:16)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.cp.emit (D:\npm\cache\_npx\18fcca21cf4d8fd7\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
Error with command: npx
Error: Error: Command failed with exit code 1: npx @vue/cli@latest create test -m pnpm
    at D:\pnpm\store\v3\tmp\dlx-1268\node_modules\.pnpm\registry.npmmirror.com+create-tauri-app@1.0.2\node_modules\create-tauri-app\dist\index.js:146:15
    at Generator.throw (<anonymous>)
    at rejected (D:\pnpm\store\v3\tmp\dlx-1268\node_modules\.pnpm\registry.npmmirror.com+create-tauri-app@1.0.2\node_modules\create-tauri-app\dist\index.js:38:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Additional context

Based on the error message (in Stack trace), I can roughly guess the cause of the error: According to the error message, "npx @vue/cli" was executed during the creation process, but my "@vue/cli" was installed in pnpm instead of npm. That's what led to the mistake.

@amrbashir
Copy link
Member

Can you share the full logs? does it work correctly if you uninstalled the global version?

@timongh
Copy link
Author

timongh commented Jul 25, 2022

full log
PS D:\proj> pnpm create tauri-app
.../pnpm/store/v3/tmp/dlx-22460          |  +96 ++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: D:\pnpm\store\v3
  Virtual store is at:             ../pnpm/store/v3/tmp/dlx-22460/node_modules/.pnpm
.../pnpm/store/v3/tmp/dlx-22460          | Progress: resolved 98, reused 96, downloaded 0, added 96, done

We hope to help you create something special with Tauri!
You will have a choice of one of the UI frameworks supported by the greater web tech community.
This tool should get you quickly started. See our docs at https://tauri.app/

If you haven't already, please take a moment to setup your system.
You may find the requirements here: https://tauri.app/v1/guides/getting-started/prerequisites

Press any key to continue...

? What is your app name? test
? What should the window title be? Test
? What UI recipe would you like to add? Vue CLI (https://cli.vuejs.org/)
? Add "@tauri-apps/api" npm package? Yes
>> Running initial command(s)
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.


Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project:
? Choose a version of Vue.js that you want to start the project with 3.x
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No


Vue CLI v5.0.8
✨  Creating project in D:\proj\test.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

 ERROR  Error: command failed: pnpm install --reporter silent --shamefully-hoist
Error: command failed: pnpm install --reporter silent --shamefully-hoist
    at ChildProcess.<anonymous> (D:\npm\cache\_npx\18fcca21cf4d8fd7\node_modules\@vue\cli\lib\util\executeCommand.js:138:16)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.cp.emit (D:\npm\cache\_npx\18fcca21cf4d8fd7\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
Error with command: npx
Error: Error: Command failed with exit code 1: npx @vue/cli@latest create test -m pnpm
    at D:\pnpm\store\v3\tmp\dlx-22460\node_modules\.pnpm\registry.npmmirror.com+create-tauri-app@1.0.2\node_modules\create-tauri-app\dist\index.js:146:15
    at Generator.throw (<anonymous>)
    at rejected (D:\pnpm\store\v3\tmp\dlx-22460\node_modules\.pnpm\registry.npmmirror.com+create-tauri-app@1.0.2\node_modules\create-tauri-app\dist\index.js:38:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

When I remove @vue/cli from pnpm, I get the same result. The logs are also the same.

@amrbashir
Copy link
Member

Looks like an error in @vue/cli itself, can you try npx @vue/cli@latest create test -m pnpm and see if it works?

@timongh
Copy link
Author

timongh commented Jul 25, 2022

It does seem to be a problem with @vue/cli

npx @vue/cli create test
OK
PS D:\proj>  npx @vue/cli create test
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.


Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project:
? Choose a version of Vue.js that you want to start the project with 3.x
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No


Vue CLI v5.0.8
✨  Creating project in D:\proj\test.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

added 637 packages in 47s
🚀  Invoking generators...
📦  Installing additional dependencies...

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

added 16 packages in 3s
⚓  Running completion hooks...

📄  Generating README.md...

🎉  Successfully created project test.
👉  Get started with the following commands:

 $ cd test
 $ npm run serve

npx @vue/cli create test -m pnpm
Error
PS D:\proj> npx @vue/cli create test -m pnpm
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.


Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project:
? Choose a version of Vue.js that you want to start the project with 3.x
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No


Vue CLI v5.0.8
✨  Creating project in D:\proj\test.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

 ERROR  Error: command failed: pnpm install --reporter silent --shamefully-hoist
Error: command failed: pnpm install --reporter silent --shamefully-hoist
    at ChildProcess.<anonymous> (D:\npm\cache\_npx\15e985e3d7a3258b\node_modules\@vue\cli\lib\util\executeCommand.js:138:16)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.cp.emit (D:\npm\cache\_npx\15e985e3d7a3258b\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

@amrbashir
Copy link
Member

I suggest you open an issue at @vue/cli repo then.

@timongh
Copy link
Author

timongh commented Jul 25, 2022

vuejs/create-vue#127

@amrbashir
Copy link
Member

amrbashir commented Jul 25, 2022

Thank you. Once they fix that, it will automatically land in create-tauri-app

@amrbashir
Copy link
Member

@timongh you opened an issue in the wrong repo, you should close it and open it in https://github.com/vuejs/vue-cli

@amrbashir
Copy link
Member

Actually there is already an open one here vuejs/vue-cli#7106

@timongh
Copy link
Author

timongh commented Jul 25, 2022

Thanks for the reminder, I've turned it off.

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