After running CDE I can't build sample polymer app in dart editor - dart

file:/C:/Users/Dave/dart/td2/build.dart
build.dart returned error code 255
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = 'C:\Users\Dave\dart\td2\packages\args\args.dart' (OS Error: The system cannot find the file specified., errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
Dart editor was working fine with a polymer app that I was developing previously.
I have rebooted, reinstalled dart editor with no luck
Running Pub Get manually fails as well as it can't find files either. Evrrything was working prior to trying CDE and the designer.

I think running pub cache repair (run in command line interface) should be able to fix this.

Related

Flutter #dart=2.9 import 'dart:math'; Error, dart code won't run in emulator?

Question: How can I solve the flutter error as shown below & why does this happen?
What I can't understand out of this error, is
that I can't comprehend what #dart=2.9 is. I hadn't previously run or coded the file in a while. So, when I came back to work on this flutter file project, it threw me this error?
I tried updating flutter on the command prompt. Everything it's fine according to the flutter doctor. The only missing piece is just visual studio, but I use visual studio Code. So, I am assuming that's not the problem. If not, then what could it be? I am deeply thinking about this long error, that can't get to comprehend.
Much appreciation in advance any sort of help will be gratefully appreciated
Error: Flutter run -
When I run flutter run it always displays the errors below.
Invalid depfile: C:\Users\14706\Desktop\Test-SETUP\New folder\This_Folder_Contains_Map_Tests_From_Top_To_Bottom_Atempts\Challenge_1\flutter_login_auth\.dart_tool\flutter_build\6494cc4bb6a11f1a583790c79662ece5\kernel_snapshot.d
Invalid depfile: C:\Users\14706\Desktop\Test-SETUP\New folder\This_Folder_Contains_Map_Tests_From_Top_To_Bottom_Atempts\Challenge_1\flutter_login_auth\.dart_tool\flutter_build\6494cc4bb6a11f1a583790c79662ece5\kernel_snapshot.d
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/firebase_database.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
lib/Pages/auth/mainLoginCheck.dart:2:8: Error: Not found: 'dart:html'
import 'dart:html';
^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/src/utils/push_id_generator.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/src/database_reference.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/src/event.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/src/firebase_database.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/src/query.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/firebase_database-6.1.2/lib/src/on_disconnect.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
// #dart=2.9
^^^^^^^^^^^^
Unhandled exception, umm...???
what even is this error that comes along down here?
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart
%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1 asFileUri (package:vm/kernel_front_end.dart:659:37)
#2 writeDepfile (package:vm/kernel_front_end.dart:799:2
1)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:625:9)
<asynchronous suspension>
#4 starter
(package:frontend_server/frontend_server.dart:1451:12)
<asynchronous suspension>
#5 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server
/bin/
frontend_server_starter.dart:10:14)
<asynchronous suspension>
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\14706\Desktop\CODES\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\14706\Desktop\CODES\Flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 28s
Running Gradle task 'assembleDebug'... 30.1s
Exception: Gradle task assembleDebug failed with exit code 1
Error: Not found: 'dart:html'
import 'dart:html';
I have previoulsy tried updating flutter on command prompt. Everything it's fine according to flutter doctor. I have tried looking on what #=dart=2.9 is? but not enought understanding still. I have also tried looking on something the error highlights which is 'dart:html'; still, I don't comprehend how and why that is an errors?
1-just delete import 'dart:html'; from your code
2-run flutter clean then flutter pub get
if that doesn't work check this

Build PHP_CodeSniffer from sources with HHVM

I am trying to use PHP_CodeSniffer in my Hack project. I tried getting the phpcs.phar file from the repository and run it, but I get an error, something that seems to be a bug of HHVM (see #5140). So I tried building it to .phar myself. I ran the most obvious script:
scripts/build-phar.php
so
$ hhvm ./scripts/build-phar.php
This is the output I get:
Building phpcs phar
=> /devel/phpcs/phpcs.phar
Fatal error: Uncaught exception 'PharException' with message '/devel/phpcs/phpcs.phar is not a file' in /devel/phpcs/scripts/build-phar.php:43
Stack trace:
#0 /devel/phpcs/scripts/build-phar.php(43): Phar->__construct()
#1 {main}
I am not sure where to look or what to look for here. Could you please give me some advice on building a .phar from this?

'Package "doctrine.common" is already registered as "Doctrine.Common"

On a fresh flow install, that is after copying my existing site and launching "composer install" with sucess, when I execute the "flow" command, I obtain the following error:
PHP Fatal error: Uncaught exception 'TYPO3\Flow\Package\Exception\InvalidPackag
eStateException' with message 'Package "doctrine.common" is already registered a
s "Doctrine.Common".' in C:\Development\my-cyme\Packages\Framework\TYPO3.Flow\Cl
asses\TYPO3\Flow\Package\PackageManager.php:723
Stack trace:
#0 C:\Development\my-cyme\Packages\Framework\TYPO3.Flow\Classes\TYPO3\Flow\Packa
ge\PackageManager.php(1061): TYPO3\Flow\Package\PackageManager->registerPackage(
Object(TYPO3\Flow\Package\Package), false)
#1 C:\Development\my-cyme\Packages\Framework\TYPO3.Flow\Classes\TYPO3\Flow\Packa
ge\PackageManager.php(881): TYPO3\Flow\Package\PackageManager->registerPackagesF
romConfiguration()
#2 C:\Development\my-cyme\Packages\Framework\TYPO3.Flow\Classes\TYPO3\Flow\Packa
ge\PackageManager.php(815): TYPO3\Flow\Package\PackageManager->scanAvailablePack
ages()
#3 C:\Development\my-cyme\Packages\Framework\TYPO3.Flow\Classes\TYPO3\Flow\Packa
ge\PackageManager.php(155): TYPO3\Flow\Package\PackageManager->loadPackageStates
()
#4 C:\Development\my-cyme\Pac in C:\Development\my-cyme\Packages\Framework\TYPO3
.Flow\Classes\TYPO3\Flow\Package\PackageManager.php on line 723
I'm really out of clue here on what to do or what's causing this issue. Nothing was found on the web either.
I had to delete the PackageStates.php file and then everything worked fine.
I’ve had this issue recently, too (and so did a colleague). Deleting Packages/Libraries/doctrine/common and running a composer install fixed the issue.

Executing a dart application prints errors to console

I am using Dart Editor|
Dart Editor version 1.10.0.dev_01_01 (DEV)
Dart SDK version 1.10.0-dev.1.1
I open polymer_snippet and run the app and it executes as expected.
I attempted to run epimss_app but it does not run and displays the following errors to Tools Ouput (console)
--- 1:20:06 PM Starting pub serve : polymer_snippet ---
Loading source assets...
The null object does not have a getter 'pubspec'.
NoSuchMethodError: method not found: 'pubspec'
Receiver: null
Arguments: []
dart:core Object.noSuchMethod
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\barback\dependency_computer.dart 48 DependencyComputer.DependencyComputer.<fn>
dart:collection SetMixin.every
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\barback\dependency_computer.dart 47 DependencyComputer.DependencyComputer
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\barback\load_all_transformers.dart 33 loadAllTransformers.<async>
dart:isolate _RawReceivePortImpl._handleMessage
This is an unexpected error. Please run
pub --trace 'serve' 'web' '--port' '8080' '--admin-port' '49923' '--hostname' 'localhost'
and include the results in a bug report on http://dartbug.com/new.
I tried to run polymer-snippet again with the same result. I closed Dart Editor did a pub cache repair and attempted running either application again with the same result.
The GUI (if dart-eclipse-editor is used) says Error Launching application - Could not start pub serve or connect to pub.
Why is this happening? I would expect to be able to change from one dart app to another and run either without any issues.
Thanks

Runnning the web components build.dart: FormatException: Could not find an option named "machine"

I'm getting this error whenever I update some file and the build.dart runs:
build.dart --changed=web\index.html
file:/C:/Users/Fernando/dart/ACIMReader/build.dart
build.dart returned error code 255
Unhandled exception:
FormatException: Could not find an option named "machine".
#0 ArgParser._validate (package:args/args.dart:349:21)
#1 ArgParser._parseLongOption (package:args/args.dart:488:16)
#2 ArgParser.parse (package:args/args.dart:313:27)
#3 _processArgs (package:web_components/component_build.dart:99:26)
#4 build (package:web_components/component_build.dart:34:26)
#5 main (file:///C:/Users/Fernando/dart/ACIMReader/build.dart:5:8)
The editor recently started adding a --machine flag so that build scripts would know to output machine readable messages. web_components added support for the flag last week, have you run pub update?

Resources