gpt4 book ai didi

Dart 正在应用程序目录中查找包(加载资源失败)

转载 作者:行者123 更新时间:2023-12-03 03:29:33 25 4
gpt4 key购买 nike

运行 WebUI 新项目生成的代码时出现错误:

Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1:3030/Applications/dart/dart-sdk/pkg/web_ui/web_ui.dart
Failed to load a file http://127.0.0.1:3030/Applications/dart/dart-sdk/pkg/web_ui/web_ui.dart

我已经运行了 pub install , 并且包是从 project/packages 目录符号链接(symbolic link)的。

我应该设置一个标志吗?

pub.yaml:
name: test
description: A sample WebUI application
dependencies:
browser: any
js: any
web_ui: any

最佳答案

我在 Preferences > Editor 中有 Package-root 目录,Directory Settings 指向 /Applications/dart/dart-sdk/pkg/ .清除此字段可解决问题。

关于Dart 正在应用程序目录中查找包(加载资源失败),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14917534/

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