gpt4 book ai didi

dart - 无法为 Dart 运行 pub get。如何在 Windows 10 上设置 PUB_CACHE?

转载 作者:行者123 更新时间:2023-12-03 03:43:37 24 4
gpt4 key购买 nike

我需要在 Windows 10 上构建一个 Dart Web App 项目。
每次尝试运行 pub get 时都会出现此错误:

"Target \\storage\N-HOME\nz9\APPLICATION DATA\Pub\Cache\hosted\pub.dartlang.org\
dart_to_js_script_rewriter-1.0.1\lib of Link.create on Windows cannot be converted
to start with a drive letter. Unexpected error., path = ''"

我认为问题在于我的 APPDATA 设置为虚拟磁盘(路径以“\STORAGE\N-HOME”开头),因为我使用的是公共(public)机器。我尝试按照 here 所示创建系统环境变量 PUB_CACHE .但这并没有什么不同。

有没有人看到这个问题并修复它?

最佳答案

您可以通过设置 PUB_CACHE 来更改位置环境变量,但您需要重新启动任何 shell 才能使其生效。

但是,您可能会发现这仍然行不通;我认为事情需要在本地驱动器上,并且当前(由于使用符号链接(symbolic link))您的 PUB_CACHE 需要与您的应用程序位于同一驱动器上(请参阅 Pub does't work on Windows 8 when app is on different drive than Pub cache )。

关于dart - 无法为 Dart 运行 pub get。如何在 Windows 10 上设置 PUB_CACHE?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37690936/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com