core icon indicating copy to clipboard operation
core copied to clipboard

[Bug report] yarn install __dirname the path is wrong

Open qqlcx5 opened this issue 2 years ago • 1 comments

Description

npm correct image yarn wrong image

Reproduction

https://github.com/qqlcx5/vuepress-next/tree/master/.github/workflows

Used Package Manager

yarn

System Info

Environment Info:

  System:
    OS: macOS 13.0
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 14.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.18.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 105.0.5195.52
    Edge: Not Found
    Firefox: Not Found
    Safari: 16.1
  npmPackages:
    @vuepress/core:  2.0.0-beta.51 
    @vuepress/theme-default:  2.0.0-beta.51 
    vuepress: ^2.0.0-beta.51 => 2.0.0-beta.51 
  npmGlobalPackages:
    vuepress: Not Found

qqlcx5 avatar Sep 06 '22 16:09 qqlcx5

Related file https://github.com/qqlcx5/vuepress-next/blob/master/docs/.vuepress/config/sidebar.js

CC @meteorlxy

Mister-Hope avatar Sep 07 '22 07:09 Mister-Hope

Is the issue still exisit?

And does the issue exisits in npm@8, pnpm @7 and yarn@2 and yarn@3?

I guess this is because we are using esbuild to handle your config file, and the import.meta object is somehow wrong under env you reported. However, I do think that it's probably not a VuePress issue, The issue probably comes from upstream.

Mister-Hope avatar Dec 09 '22 06:12 Mister-Hope

I just tried the repo locally with yarn v1.22.19 and upgrade all deps to latest version. Everything looks good.

meteorlxy avatar Dec 13 '22 03:12 meteorlxy