Why is dart pub suddenly trying to install packages in my css folder?

别来无恙 提交于 2019-12-11 13:59:44

问题


Running pub update ...
Pub update failed, [1] Resolving dependencies...
DirectoryIOException: Directory listing failed, path = <longpath>/web/css/packages (OS Error: No such file or directory, errno = 2)

Why would pub suddenly try to look for packages in my css folder?


回答1:


The short answer, pub puts symlinks into subdirectories to ensure that you can use package: in any Dart file in any subdirectory of a "deployable" directory.

Because web is deployable in the sense that you'll likely take everything in web and throw it up on a web server, pub wants to make it easy for Dart files to work.

There are no conventions right now, so pub takes the optimistic approach because it can't anticipate where you might put Dart files.

Regardless, you shouldn't get an error, so this might be a bug. I just tried it on a brand new sample app with a web/css and pub install and pub update worked for me.

Can you please submit a bug at http://dartbug.com/new with details of your OS and the output of dart --version ? Many thanks!



来源:https://stackoverflow.com/questions/14262638/why-is-dart-pub-suddenly-trying-to-install-packages-in-my-css-folder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!