I am getting the following errors when compiling my web-app with DDC:
SEVERE] build_web_compilers|ddc on package:sass/sass.dartdevc.module (cached):
Error compiling dartdevc module:sass|lib/sass.ddc.js
[error] Target of URI doesn't exist: 'node/interface.dart'. (package:sass/src/importer/node.dart, line 5, col 8)
[error] The exported library ''node/interface.dart'' can't have a part-of directive. (package:sass/src/importer/node.dart, line 5, col 8)
[error] Target of URI doesn't exist: 'io/interface.dart'. (package:sass/src/io.dart, line 7, col 8)
[error] Target of URI doesn't exist: 'io/interface.dart'. (package:sass/src/io.dart, line 12, col 8)
[error] The exported library ''io/interface.dart'' can't have a part-of directive. (package:sass/src/io.dart, line 12, col 8)
[error] Target of URI doesn't exist: 'package:package_resolver/package_resolver.dart'. (package:sass/src/sync_package_resolver.dart, line 1, col 8)
Im not really sure what I need. I have a dart file named compiler-sass.dart with the following code:
import 'dart:io';
import 'package:sass/sass.dart' as sass;
void main(List<String> arguments) {
var result = sass.compile(arguments[0]);
new File(arguments[1]).writeAsStringSync(result);
}
If I manually compile my sass files it works but not with the command:
webdev serve --hot-reload
My pubspec has the following dependencies:
dependencies:
path: ^1.4.1
sass: ^1.16.1
vue: ^0.4.1
build_runner: ^1.1.2
build_web_compilers: ^1.0.0
intl: ^0.15.7
What am I missing here? Why doesnt it work?
https://pub.dartlang.org/packages/sass_builder integrates directly with webdev to incrementally only build what changed and what the browser fetches.
Related
The runs fine on Android but when I run it for iOS. It shows a few warnings but also an error. Following are the logs.
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
(This is taking an unexpectedly long time.)⡿
Compiler message:
../../../../desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/snackbar/snack_route.dart:279:8: Error: The
method 'SnackRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.
void install(OverlayEntry insertionPoint) {
^
../../../../desktop/dev/flutter/packages/flutter/lib/src/widgets/routes.dart:41:8: Context: This is the overridden method ('install').
void install() {
^
(This is taking an unexpectedly long time.)⡿../../../../desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/routes/default_route.dart:242:9: Error: No named
parameter with the name 'animation'.
animation: animation,
^^^^^^^^^
../../../../desktop/dev/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments
don't match.
CupertinoFullscreenDialogTransition({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(This is taking an unexpectedly long time.)⣟../../../../desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/snackbar/snack_route.dart:289:18: Error: Too
many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
super.install(insertionPoint);
^
Running pod install... 11.5s
Running Xcode build...
Xcode build done. 63.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/apple/desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.m:88:37:
warning: incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull'
[-Wincompatible-pointer-types]
binaryMessenger:_headlessEngine];
^~~~~~~~~~~~~~~
In module 'Flutter' imported from
/Users/apple/desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.h:2:
/Users/apple/Desktop/dev/upwork/body_alarm/ios/Flutter/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing argument
to parameter 'messenger' here
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
^
1 warning generated.
/Users/apple/desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.4.0/ios/Classes/VibrationPlugin.m:6:4: warning:
'SwiftVibrationPlugin' is only available on iOS 13.0 or newer [-Wunguarded-availability-new]
[SwiftVibrationPlugin registerWithRegistrar:registrar];
^~~~~~~~~~~~~~~~~~~~
In file included from
/Users/apple/desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.4.0/ios/Classes/VibrationPlugin.m:2:
/Users/apple/Desktop/dev/upwork/body_alarm/build/ios/Debug-iphonesimulator/vibration/vibration.framework/Headers/vibration-Swift.h
:213:12: note: 'SwiftVibrationPlugin' has been marked as being introduced in iOS 13.0 here, but the deployment target is iOS 8.0.0
#interface SwiftVibrationPlugin : NSObject <FlutterPlugin>
^
/Users/apple/desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.4.0/ios/Classes/VibrationPlugin.m:6:4: note:
enclose 'SwiftVibrationPlugin' in an #available check to silence this warning
[SwiftVibrationPlugin registerWithRegistrar:registrar];
^~~~~~~~~~~~~~~~~~~~
1 warning generated.
Compiler message:
../../../../desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/snackbar/snack_route.dart:279:8: Error: The
method 'SnackRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.
void install(OverlayEntry insertionPoint) {
^
../../../../desktop/dev/flutter/packages/flutter/lib/src/widgets/routes.dart:41:8: Context: This is the overridden method
('install').
void install() {
^
../../../../desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/routes/default_route.dart:242:9: Error: No
named parameter with the name 'animation'.
animation: animation,
^^^^^^^^^
../../../../desktop/dev/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the
arguments don't match.
CupertinoFullscreenDialogTransition({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/snackbar/snack_route.dart:289:18: Error: Too
many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
super.install(insertionPoint);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone SE (2nd generation).
These are the packages I have use in this app:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
json_annotation:
audioplayers: ^0.15.1
wakelock:
shared_preferences:
vibration: ^1.4.0
flutter_local_notifications: ^1.1.5+1
flutter_icons: ^1.0.0+1
flutter_launcher_icons: ^0.7.4
url_launcher: ^5.4.2
get: ^1.15.2
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
build_runner:
json_serializable:
flutter_test:
sdk: flutter
I have also tried to create a new project and copy all the code from the previous project to new, but still, it does not work. Can anyone help me how to resolve these issues.
Your problem seems to be with the get package. You are a lot of versions behind. Newer versions do not pass a parameter when calling super.install(), which is where your error comes from.
Upgrading to a newer version of the package will probably fix your problem. Unless you have a reason not to go for the newest version, I suggest changing the get: ^1.15.2 line in your pubspec.yaml to get: ^3.2.2 like this :
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
json_annotation:
audioplayers: ^0.15.1
wakelock:
shared_preferences:
vibration: ^1.4.0
flutter_local_notifications: ^1.1.5+1
flutter_icons: ^1.0.0+1
flutter_launcher_icons: ^0.7.4
url_launcher: ^5.4.2
get: ^3.2.2
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
build_runner:
json_serializable:
flutter_test:
sdk: flutter
While you're at it you might as well have a look at all the other packages you're using as well. Upgrading them to newer version might get rid of some other warning messages as well.
I followed Russes' instructions found at http://forum.dcmtk.org/viewtopic.php?f=3&t=3047&start=15
With a fresh copy of his "afab" git branch, I built Xcode project for x86 arch with the command line:
cmake -DIOS_PLATFORM=SIMULATOR64 -G Xcode ../dcmtk.public
or for arm arch with:
cmake -DIOS_PLATFORM=OS -G Xcode ../dcmtk.public
However, my Xcode project can't be successfully built because of, at least, the following errors:
List of Xcode errors on ofchrenc.cc file (for eg. "No class named Implementation in OFCharacterEncoding")
The compilation with Unix makefiles gives the same errors in my case:
Scanning dependencies of target ofstd
0% Building CXX object ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o
dcmtk.public/ofstd/libsrc/ofchrenc.cc:518:28: error: no class named 'Implementation' in 'OFCharacterEncoding'
class OFCharacterEncoding::Implementation {};
dcmtk.public/ofstd/libsrc/ofchrenc.cc:556:31: error: out-of-line definition of 'getLocaleEncoding' does not match any declaration in
'OFCharacterEncoding'
OFString OFCharacterEncoding::getLocaleEncoding()
/usr/local/include/dcmtk/ofstd/ofchrenc.h:97:21: note: member declaration does not match because it is const qualified
const OFString &getLocaleEncoding() const;
[...]
dcmtk.public/ofstd/libsrc/ofchrenc.cc:644:34: error: out-of-line definition of 'setConversionFlags' does not match any declaration in
'OFCharacterEncoding'
OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags)
19 errors generated.
make 2: ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o Error 1
make 1: ofstd/libsrc/CMakeFiles/ofstd.dir/all Error 2
make: [all] Error 2
I don't understand what is wrong in my configuration:
MacOs Sierra 10.12.2
Xcode 8.2
CMake 3.7.1 (I have the same issue previously with 3.5.2 version)
GNU Make 3.81 (for Unix makefiles compilation)
Apple LLVM version 8.0.0.8000042
Darwin version of host: 16.3.0
Building for minimum iOS version: 10.2 (SDK version: 10.2)
I'm not sure about the first error message but
/usr/local/include/dcmtk/ofstd/ofchrenc.h:97:21: note: member
declaration does not match because it is const qualified const
OFString &getLocaleEncoding() const;
seems to indicate that you are mixing an old version of "ofchrenc.h" (stored in "/usr/local/...") with a more recent version of "ofchrenc.cc" (stored in your working directory).
I am trying to build my WebGL dart application with "pub build".
I am able to run "pub serve" without problems, but "pub build" gives me 2 erros:
Directive not allowed here
part of MyProject
^^^^^^^^^^^^^^^^
Could not find main [I think this happends because of unfinished compile]
I only use browser:any as dependency.
Why could this be?
Thank you very much!
EDIT:
My pubspec.yaml
name: LD29
description: My LD29 game
author: snip
homepage: snip
dependencies:
browser: any
The includes:
library LD29;
import 'dart:html';
import 'dart:async';
import 'dart:math';
import 'dart:typed_data';
import 'dart:web_gl';
part 'Scene.dart';
part 'MainScene.dart';
part 'Entities.dart';
part 'Quadgrid.dart';
part 'Vecd.dart';
part 'Quad.dart';
part 'TexQuad.dart';
part 'ShaderProgram.dart';
part 'ShaderSource.dart';
part 'TextureGL.dart';
part 'FontRendering.dart';
The problematic "part of"
part of LD29;
class Quadgrid {
const static int size = 20;
const MAX_GRID_W = DISPLAY_WIDTH / size;
const MAX_GRID_H = DISPLAY_HEIGHT / size;
...
}
It seems no diffrent from my other files.
OK, after coming back to it a few months later, I gave debugging this problem another go. For my application, we moved the main() method to a different file than the one that had the 'library coUclient' command at the top. This meant that 'pub build' would fail:
master#dellaptop ~/Dropbox/Dart/coUclient $ pub build
Loading source assets...
Building coUclient...
[Info from Dart2JS]:
Compiling coUclient|web/dart/engine/initialize.dart...
[Error from Dart2JS]:
web/dart/engine/initialize.dart:1:1:
Directive not allowed here.
part of coUclient;
^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS]:
web/dart/engine/initialize.dart:11:5:
Cannot resolve 'localStorage'.
if(localStorage["interface"] == null || localStorage["interface"] == "desktop")
^^^^^^^^^^^^
I don't know why I didn't see it before, but what tipped me off was that I saw it was starting the compile with initalize.dart and it occurred to me that that was the file that had main() in it. I then moved the main() method back into main.dart (which has the 'library coUclient' command at the top) and re-ran pub build. This time it succeeded because it started:
Loading source assets...
Building coUclient...
[Info from Dart2JS]:
Compiling coUclient|web/main.dart...
[Dart2JS on coUclient|web/main.dart]:
and all went well.
Moral of the story is, make sure your main() is in the same file as your 'library ' command and the "Directive not allowed here" problem shouldn't happen.
I just downloaded the Cocos2d-x SDK and tried to compile the hello world example with the following result:
<code>The Selected NDK toolchain version was 4.8 !
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/external
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/cocos
Android NDK: jni/Android.mk: Cannot find module with tag '2d' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
jni/Android.mk:22: *** Android NDK: Aborting. . Stop.
make: Leaving directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
Traceback (most recent call last):
File "./build_native.py", line 166, in <module>
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "./build_native.py", line 153, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "./build_native.py", line 89, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android ] fails!</code>
Which cocos2d-x version are you using? Seems like you didn't define your env variables correctly. Please have a look at this tutorial and make sure you define the following variables:
COCOS2DX_ROOT : should point to the root directory of cocos2d-x
ANDROID_SDK_ROOT : Should point to the root directory of the Android SDK
NDK_ROOT : Should point the to root directory of the Android NDK
NDK_TOOLCHAIN_VERSION : Which Android NDK toolchain should be used
See the problem is that the system is not able to compile the cocos.py.
So, if you open cocos.py from the bin directory where you have unzipped the file
it runs smoothly.
The thing is Python3.x is not able to compile the Phython2.x code.
So we must change the path in environment variable so the system doesn't a python2 file with the help of python3 compiler.
Thanks
Summary
1.Go to Control Panel, then type path or environment in search bar
2.open Evnvironment variables
3.Just delete any C:\Python34 or anything starts with python3.x and add C:\Python27 path where you have installed.
Video link:
https://youtu.be/T8zk3sv0cL0
I am working on an http server POC based on the route package demo. It requires the path package which states that my pubspec.yaml file contain the folowing:
name: poc
description: Proof of Concept
dependencies:
route: any
path:any
The editor marks the word path as a reserved word and when I do a pub get I get an error
Pub get failed, [1] Syntax error on line 5, column 11: invalid YAML in plain scalar
which is the line that has the path dependency. How do I resolve this?
Dart Editor version 1.0.0_r30338 (DEV)
Dart SDK version 1.0.0.7_r30338
You are missing a space:
path:any
Should be:
path: any
I get the same error without a space on any item in the pubspec.yaml