Cannot load angular.dart - dart

During the reproduction of this example, something strange happend: https://github.com/dart-lang/dart_by_example/tree/master/example/angular/basics/conditionally_switch_between_dom_elements
So created a plain Dart project in WebStorm, added angular.dart, copied the example. Everything works well, if the files are "web" directory.
BUT, after I moved the three files into a switch subdirectory, I have the following problem:
An error occurred loading file: package:angular/angular.dart
Do you have any idea? What did I missed.

If you added the subdirectory after you ran pub get then it may not have the packages symlink folder. Try running pub get (from your apps root directory) again which should generate any missing packages in subdirectories that may have been added, without re-downloading any dependencies.

Related

node_modules minified codes and Electron-packager

I can see in my myproject\node_modules modules(not all) which get normal .js code and .min.js versions:
For example jsonpath
After running the packager I get the same two files in the myproject-win32-ia32\node_modules\jsonpath folder.
So my question is: Is there anyway of saying to the packager (or other utility I could run before packaging)to keep only the minified (or the original) if both exist
I find not so good to keep both versions, the installed package at the end is bigger than it should be for nothing....

Grails .slcache is not getting recreated on a new build

I'm running a Grails build. For some reason, the .war file created sometimes does not get the appropriate .jar files loaded into the WEB-INF/lib folder. A subsequent Tomcat deployment fails. A co-worker that encountered this issue said to get rid of the .slcache in the user home folder on my windows server. I deleted the folder under c:/Users/myuser/.grails/.slcache. I re-ran a build and the .slcache is not getting recreated and I am still missing the .jar files.
Any idea what is happening and how to resolve?
Did you try changing the spark plugs (or at a minimum cleaning and re-gapping them) in your car? That'll be about as helpful.
The .slcache directory is created by spring-loaded, which Grails uses for class reloading when running the app with grails run-app. It has absolutely nothing to do with creating war files.

using "packages" folder in DART

In my app, I've the pubspec.yaml file as:
name: server
dependencies:
oracledart: any
and after running pub get, I got the folder "packages" updated correctly.
I wanted to create sub folders for testing my functions individually, so I created folder: test/boms.dart, which is:
import 'dart:async';
import 'package:oracledart/oracledart.dart';
void main() {
...
}
but once running it, I got this error msg:
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = 'G:\app\bin\test\packages\oracledart\oracledart.dart' (OS Error: The system cannot find the path specified.
Do I need to copy the 'packages' folder to each sub folder have the function "main", or there is another way to connect it!
At least for top-level folders the packages link should be created automatically. Try run pub get or pub upgrade or create the test folder from within DartEditor (I don't know what creates the symlinks but usually they are created automatically in top-level folders as far as I remember). In subfolders of top-level folders like bin, test, ... I always had to create them manually by creating a new symlink to the packages link in the package root.
In Linux like:
ln -s ../packages/ packages
don't know how to in Windows.
I think the DART team, should make symlinks auto generation in sub folders of the "bin" folder, same as the case of the sub folders of the "web" folder.
anyhow, to create them manually in Windows 7, I found it make as below:
1. run CMD as admin
2. mklink /D myApp\bin\test\packages myApp\packages [D for directory, not drive]
I found how to make symlinks in windows here
another full detailed way is mentioned here

Re-sync folders via command line

I am currently working out how best to go about syncing files in my folders which will be included in my installer.
It works fine through the interface, but doesn't seem to work out well when doing it through the command line.
My folder structure is essentially:
Root
Installer Config
My code 1
My code 2
My installer is to set up my two code folders when installed. Like I mentioned, I have this set up working for building the installer through the interface.
In my project, I have My code 1 and My code 2 folders set as sync folders in the Files and Folders section.
In the Installer Config folder, I am running a couple of scripts which essentially boil down to a batch file which does:
"AdvancedInstaller.com" /loadpathvars PathVariables.xml
"AdvancedInstaller.com" /execute myproject.aip commands.txt
and my commands.txt which does:
;aic
ResetSync APPDIR\mycode1
ResetSync APPDIR\mycode2
Save
Rebuild
When the ResetSync calls are made, I get the error: Folder not synchronized: APPDIR\mycode1. but when I just hit refresh in the Files and Folders section in interface, it works fine.
To create this error I add a new file to the 'My code 1' folder. Run the scripts, and I get the 'Folder not synchronized' error.
Solved on Advanced Installer forums.

Any way to get Intellij IDEA to add *GrailsPlugin.groovy to class path?

When managing a grails plugin in Intellij Idea (I'm using version 10.5.2 on OSX, if it matters), I can't get it to add the *GrailsPlugin.groovy file to the classpath in a way that it can be recognized by unit tests run from the IDE. The tests run fine from the command line using grails test-app; I just want IDEA to be able to run them too.
The problem is that the *GrailsPlugin.groovy file is at the top level directory in the plugin, which is not marked as a source directory in IDEA. I definitely don't want to make it a source folder, since that will screw up lots of things such as the package path to all of my regular source files (amongst many other issues).
I've tried adding *GrailsPlugin.groovy to my Settings->Compiler Resource Patterns, but to no avail. Since the file isn't in a source folder, it's ignored.
I tried creating a source folder that has a symlink to the *GrailsPlugin.groovy file, but that introduces all kinds of synchronization issues.
Anyone have any ideas?

Resources