在“/home/vagrant/.pub-cache/hosted/pub.dartlang.org/protobuf-0.5.3"

时间:2017-02-13 17:02:15

标签: vagrant dart dart-pub

我正在尝试从Vagrant VM内部构建Dart项目。该项目实际上是使用IntelliJ从我的主机创建的,但我想任何使用Vagrant VM的人当然都能够构建项目(并且通常可以使用Dart工具完成所有可能与Dart项目相关的工作),这就是我设置Vagrant VM进行开发的主要原因。

在我的来宾计算机中(通常在Vagrant环境中),路径/vagrant包含与Vagrantfile位于主机上的文件相同(并同步)的文件

我的Dart项目是在主机上的dart-angular-client文件夹下创建的,该文件与Vagrantfile处于同一级别。我能够从我的主机dart-angular-client和IntelliJ中构建项目,但我们的想法是能够从Vagrant机器内部构建项目。

因此,当我尝试在我的guest Vagrant VM的pub build下输入/vagrant/dart-angular-client时,我收到以下错误

Could not find a file named "pubspec.yaml" in "/home/vagrant/.pub-cache/hosted/pub.dartlang.org/protobuf-0.5.3"

其中/home/vagrant/基本上是来宾Vagrant VM的主目录。我尝试从客户机内部手动和全局安装Dart软件包,并且该软件包确实安装在/home/vagrant/.pub-cache下,正如人们所预料的那样,因为(据我所知)全球安装/激活的Dart软件包放在该文件夹下(即使在我的主机上)。

如何从Vagrant VM内部构建项目?

修改

完成pub get后(由GünterZöchbauer建议),当我运行命令pub build时,我获得了

vagrant@vagrant-ubuntu-trusty-64:/vagrant/dart-angular-client$ pub build
Loading source assets... 
Loading angular2/transform/codegen and dart_to_js_script_rewriter transformers... 
Loading angular2 transformers... (6.5s)Dumping native stack trace for thread c36
  [0x000000000091a708] dart::WeakTable::SetValue(dart::RawObject*, long)
  [0x000000000091a708] dart::WeakTable::SetValue(dart::RawObject*, long)
  [0x00000000008c3e20] dart::Scavenger::ProcessWeakReferences()
  [0x00000000008c464f] dart::Scavenger::Scavenge(bool)
  [0x00000000006f0298] dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::ApiCallbacks, dart::Heap::GCReason)
  [0x00000000006f0cc8] dart::Heap::AllocateNew(long)
  [0x000000000078baf8] dart::Object::Allocate(long, long, dart::Heap::Space)
  [0x00000000007aadc3] dart::TypedData::New(long, long, dart::Heap::Space)
  [0x0000000000aeaf69] dart::BootstrapNatives::DN_TypedData_Uint8Array_new(_Dart_NativeArguments*)
  [0x00007f0cb907e579] Unknown symbol
  [0x00007f0cb737e97d] Unknown symbol
  [0x00007f0cab554524] Unknown symbol
  [0x00007f0cab5534ee] Unknown symbol
  [0x00007f0cab552588] Unknown symbol
  [0x00007f0cab551e6d] Unknown symbol
  [0x00007f0cb601dfba] Unknown symbol
  [0x00007f0cab551a53] Unknown symbol
  [0x00007f0cab54f4e9] Unknown symbol
  [0x00007f0cab50fde3] Unknown symbol
  [0x00007f0caeb01d4d] Unknown symbol
  [0x00007f0cb6c78cb0] Unknown symbol
  [0x00007f0cb52c198f] Unknown symbol
  [0x00007f0cb6c7a97e] Unknown symbol
  [0x00007f0cab56cf92] Unknown symbol
  [0x00007f0cab58165a] Unknown symbol
  [0x00007f0caeaee66d] Unknown symbol
  [0x00007f0cab581ff7] Unknown symbol
  [0x00007f0cab51bba1] Unknown symbol
  [0x00007f0caeb01d4d] Unknown symbol
  [0x00007f0cb6c78cb0] Unknown symbol
  [0x00007f0cb52c198f] Unknown symbol
  [0x00007f0cb6c7a97e] Unknown symbol
  [0x00007f0cab56cf92] Unknown symbol
  [0x00007f0cab58165a] Unknown symbol
  [0x00007f0caeaee66d] Unknown symbol
  [0x00007f0cab581ff7] Unknown symbol
  [0x00007f0cab52c77b] Unknown symbol
  [0x00007f0caeb01d4d] Unknown symbol
  [0x00007f0cb6c78cb0] Unknown symbol
  [0x00007f0cb52c198f] Unknown symbol
  [0x00007f0cb6c7a97e] Unknown symbol
  [0x00007f0cab56cf92] Unknown symbol
  [0x00007f0cab58165a] Unknown symbol
  [0x00007f0caeaee66d] Unknown symbol
  [0x00007f0cab5389f0] Unknown symbol
  [0x00007f0cb6c80a6d] Unknown symbol
  [0x00007f0cb6c8048c] Unknown symbol
  [0x00007f0cb30900bd] Unknown symbol
  [0x00007f0caeaebbe4] Unknown symbol
  [0x00007f0caeafbd71] Unknown symbol
  [0x00007f0caeafe6b8] Unknown symbol
  [0x00007f0cb6c80a6d] Unknown symbol
  [0x00007f0cb6c8048c] Unknown symbol
  [0x00007f0cb30900bd] Unknown symbol
  [0x00007f0cb6c915c2] Unknown symbol
  [0x00007f0cb6c80ae9] Unknown symbol
  [0x00007f0cb6c8048c] Unknown symbol
  [0x00007f0cb30900bd] Unknown symbol
  [0x00007f0cb6c915c2] Unknown symbol
  [0x00007f0cab582b12] Unknown symbol
  [0x00007f0cb651de80] Unknown symbol
  [0x00007f0caeaf2520] Unknown symbol
  [0x00007f0cab58756e] Unknown symbol
  [0x00007f0cb907e836] Unknown symbol
  [0x000000000064e2f0] dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&)
  [0x00000000006521bd] dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
  [0x000000000074f4e8] dart::IsolateMessageHandler::HandleMessage(dart::Message*)
  [0x000000000077124a] dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
  [0x00000000007715e1] dart::MessageHandlerTask::Run()
-- End of DumpStackTrace

这似乎有点严重。我不确定是什么导致了这个问题(pub,Vagrant等),但这似乎是C ++代码。这看起来像是一些堆栈损坏......这是在从主机构建项目之后发生的,但是(据我所知),每当我们尝试重建时,build(如果存在)都会被替换。 Dart项目。

编辑2

我再次尝试reloadprovision虚拟机,然后我在其中进行了测试,我再次尝试build Dart项目,这同样是结果:

Loading source assets... 
Loading angular2/transform/codegen and dart_to_js_script_rewriter transformers... 
Loading angular2 transformers... (7.3s)runtime/vm/scavenger.cc: 399: error: Out of memory.
Dumping native stack trace for thread 9f9
(7.4s)  [0x000000000087b7ee] dart::Profiler::DumpStackTrace()
  [0x000000000087b7ee] dart::Profiler::DumpStackTrace()
  [0x00000000005c8f5d] dart::DynamicAssertionHelper::Fail(char const*, ...)
  [0x00000000008c353d] dart::Scavenger::Prologue(dart::Isolate*, bool)
  [0x00000000008c43e6] dart::Scavenger::Scavenge(bool)
  [0x00000000006f0298] dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::ApiCallbacks, dart::Heap::GCReason)
  [0x00000000006f0cc8] dart::Heap::AllocateNew(long)
  [0x000000000078baf8] dart::Object::Allocate(long, long, dart::Heap::Space)
  [0x000000000078bca8] Unknown symbol
  [0x00000000006520cf] dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
  [0x000000000074f4e8] dart::IsolateMessageHandler::HandleMessage(dart::Message*)
  [0x000000000077124a] dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
  [0x00000000007715e1] dart::MessageHandlerTask::Run()
-- End of DumpStackTrace
Aborted (core dumped)

编辑3

甚至没有销毁和vagrant up VM,它似乎改变了一些东西,因为我获得了:

vagrant@vagrant-ubuntu-trusty-64:/vagrant/dart-angular-client$ pub build
Loading source assets... 
Loading angular2/transform/codegen and dart_to_js_script_rewriter transformers... 
Loading angular2 transformers... (11.8s)runtime/vm/scavenger.cc: 399: error: Out of memory.
Dumping native stack trace for thread 2646
  [0x000000000087b7ee] dart::Profiler::DumpStackTrace()
(17.0s)  [0x000000000087b7ee] dart::Profiler::DumpStackTrace()
  [0x00000000005c8f5d] dart::DynamicAssertionHelper::Fail(char const*, ...)
  [0x00000000008c353d] dart::Scavenger::Prologue(dart::Isolate*, bool)
  [0x00000000008c43e6] dart::Scavenger::Scavenge(bool)
  [0x00000000006f0298] dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::ApiCallbacks, dart::Heap::GCReason)
  [0x00000000006f09b9] dart::Heap::AllocateOld(long, dart::HeapPage::PageType)
(17.6s)  [0x000000000078ba67] dart::Object::Allocate(long, long, dart::Heap::Space)
  [0x000000000078bca8] Unknown symbol
  [0x00000000007d2c2b] dart::HashMap<dart::UnorderedHashTable<dart::CompressedTokenTraits, 1l> >::InsertOrGetValue(dart::Object const&, dart::Object const&) const
  [0x00000000007d31e8] dart::CompressedTokenStreamData::AddToken(dart::Scanner::TokenDescriptor const&)
Killed

1 个答案:

答案 0 :(得分:1)