Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pub install dart-web-components failed

Running pub install on dart-web-components gives an error:

Pub install fail, HttpParserException: Connection closed before full header was received

/dart-web-components/build.dart --changed=packages\args\args.dart --changed=packages\args\src\utils.dart --changed=packages\logging\...
Failed with error code 255
Unable to open file: C:/dartapps/dart-web-components/packages/web_components/component_build.dart'file:///C:/dartapps/dart-web-components/build.dart': Error: line 8 pos 1: library handler failed

import 'package:web_components/component_build.dart'; ^

In build.dart file there's a string

import 'package:web_components/component_build.dart';

Editor shows an error

Cannot find referenced source: package:web_components/component_build.dart    

component_build.dart contains errors

Cannot find referenced source: package:args/args.dart
Cannot find referenced source: package:web_components/dwc.dart
like image 430
Juri Krainjukov Avatar asked Nov 03 '22 14:11

Juri Krainjukov


1 Answers

I solved this problem. It seems that the Cache folder (Pub) has been corrupted.

I have deleted the folder Cache:

C:\Users\<UserName>\AppData\Roaming\Pub

Then i run pub install from command line and it works.

My OS is Windows 7.

like image 107
Fabio Benedetti Avatar answered Nov 15 '22 08:11

Fabio Benedetti