Skip to content

win10 环境,yarn global add serve 后,执行serve ./dist 报错 #7449

Answered by hanalice
hanalice asked this question in Q&A
Discussion options

You must be logged in to vote

这个是yarn 的可执行目录没有被放到win10 的path 里面,如下操作可以达到目的:

  • yarn global bin 获得yarn 的bin目录
  • 添加 yarn 的bin目录win10 环境变量的Path 里面
  • 重启 PowerShell, 重新执行serve ./dist 可以work

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hanalice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant