Build failed - Check imports - Dart Angular Tutorial - angular_tour_of_heroes - part 2 - dart

While following tutorail - Angular-dart tutorial - Tour of Heroes - part 2
with using IntelliJ IDEA in Windows 10 while using chrome, I got following error(s) -
[SEVERE] build_web_compilers|entrypoint on web/main.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).
Please check the following imports:
import 'package:angular_app/app_component.css.shim.dart' as import0; from angular_app|lib/app_component.template.dart at 12:1
[SEVERE] Failed after 1.3s
Serving web on http://localhost:53323
I have checked multiple times & I have replaced all - 5 files - namely
lib/app_component.css, lib/app_component.dart, lib/app_component.html, lib/src/hero.dart & lib/src/mock_heroes.dart from Review the app structure but I am still getting the above mentioned error & -
I could not find any app_component.template.dart
Nor could found any instance of imported package:angular_app/app_component.css.shim.dart or shim using IntelliJ Find in Path (Ctrl+Shift+F)
I have tried to delete build and rebuild.
I have also re-installed dart 2.1.0 using windows package manager & changed the location of dart-sdk accordingly in IntelliJ IDEA Settings/Dart, as for brief period I was getting dart-sdk error, but that is fixed.
This my first time asking question on stacksoverflow, but I have checked similar questions, could not resolve that issue.

the most likely reason for that build failure is due to the stylesUrls files not being found. This could be because the name in that array doesn't match the name in the file system or is not the expected place in the file system.
To confirm, I started from scratch, downloaded the quickstart-master.zip to get the project structure.
And followed the steps all the way through the step you were stuck on.
The only time I was able to generate that error while following the steps is when I added thestyleUrls: ['app_component.css'], to app_component.dart prior to creating the file.
I got the same:
[SEVERE] build_web_compilers|entrypoint on test/app_test.dart.browser_test.dart:
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).
Please check the following imports:
import 'package:angular_app/app_components.css.shim.dart' as import0; from angular_app|lib/app_component.template.dart at 12:1
Once i created the css file, the error went away and everything worked fine.
I completed the entire step you were up to and my app was working fine.
I then did as you did and copied each file from the step and replaced my work with it, still worked.
So confirm my hunch, i changed the name of the css file, and received the same error.
regarding app_component.template.dart that file is auto generated by dart and can be found in your project under .dart_tool/build/generated/angular_app/lib

I had a very similar problem. I ran webdev build and then webdev serve and it fixed it right up.

Related

Package manifest at '/Package.swift' cannot be accessed (/Package.swift doesn't exist in file system)

Good Day,
I was working on a project and did a build onto my device for some testing and close down the computer for a few days. When I went to open the project back up today Im being met with this error.
"the package manifest at '/Package.swift' cannot be accessed (/Package.swift doesn't exist in file system)"
I tried all the recommended solutions I saw here on Stack with no resolution. The strange thing is that I didn't touch anything and did a build before closing it down so I'm downright stumped into whats going on here.
To help test, I made a totally new project and started to import some packages that I had on my other project. That project works just fine and the files seem to be the same.
Any help on solving this would be appreciated

Cannot compile royale app using Crux: Could not find file for class: mx.rpc.AsyncToken

I'm creating a hello world type of application using Royale 0.9.6 and Crux. It's my first time trying out Crux and I've been using the examples provided within the Royale sdk to move forward. Unfortunately after setting up everything the compilation fails with the following error:
java.lang.RuntimeException: Unable to find JavaScript filePath for class: mx.rpc.AsyncToken org.apache.royale.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:643)org.apache.royale.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:672)org.apache.royale.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:672)org.apache.royale.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:672)org.apache.royale.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:672)org.apache.royale.compiler.internal.graph.GoogDepsWriter.buildDB(GoogDepsWriter.java:325)org.apache.royale.compiler.internal.graph.GoogDepsWriter.getListOfFiles(GoogDepsWriter.java:113)org.apache.royale.compiler.internal.codegen.mxml.royale.MXMLRoyalePublisher.publish(MXMLRoyalePublisher.java:446)org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(MXMLJSCRoyale.java:441)org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale.java:265)org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.java:222)org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:369)org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:304)org.apache.royale.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:262)org.apache.royale.compiler.clients.MXMLJSC.main(MXMLJSC.java:244)
Then there are multiple error lines saying that multiple "mx.rpc" classes on which Crux depend cannot be found.
I'm wondering if I'm missing an import or something but I can't figure it out.
Thank you,
EDIT: Here are some simple steps to reproduce:
Open Moonshine
File > New > Royale Browser Project
Type any project name and create the project
Compile (CTRL + J): compilation successful
Open the main mxml file src/[appname].mxml
Add xmlns:crux="library://ns.apache.org/royale/crux" to the <js:Application> opening tag.
Add the following: <j:beads>
<crux:Crux>
</crux:Crux>
</j:beads>
Compile (CTRL + J): compilation fails as described above.
I just looked into Moonshine IDE project files in examples available in Royale repository. They were broken - I have fixed them so you can wait for Nightly build and download new SDK along with examples or just use checkout source code.
When you open any of those examples, right click in Moonshine choosing Settings and you should check Build Options - There will be many additional compiler parameters, but in your case probably it is enough if you put in "Additional Compiler Options" +configname=flex
Looking at the screenshot it looks like you're using <j:beads> but haven't declared the <j:> namespace. Try using <js:beads> instead.

Couldn't get Xamarin projects working with Rider-EAP on OSX

I was really excited, when JetBrains launched the Project Rider-EAP. First thing I've tried was to get a Xamarin-iOS project to run in Rider-EAP, but it doesn't work out of the box.
Update 1: This issue is now listed as critical bug with fix in EAP 2: https://youtrack.jetbrains.com/issue/RIDER-618
1. Problem (fixed) Projects didn't load with the exception that Xamarin.iOS.targets could not be found.
I fixed this with a simple Symlink:
ln -s /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/ “/Applications/Rider EAP.app/Contents/lib/ReSharperHost/macos-x64/mono/lib/mono/xbuild/”
2. Problem
References are not loaded correctly. Therefore the whole syntax highlighting and everything beyond is broken.
See screenshot: References are not loaded correctly
I get the following error as well:
Error:null: Error initializing task MakeDir: Could not load file or assembly '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Tasks.dll' or one of its dependencies
Switching the xbuild to mono 4.2.2 removes the error but not solves the problem.
PS: It seams that the references are loaded correctly for Xamarin Android projects.
Basic Xamarin Support like open and build is added with EAP 8 of Project Rider.
More advanced features will come with the next Builds and are tracked here: https://youtrack.jetbrains.com/issue/RIDER-1533

YouTube integration issue in iOS SDK

I am integrating YouTube in my app in which I have to login the user for authentication.I got a sample code that is working fine.When I started integrating that code in my app then I am getting some issues.
First:-
When I run the same code in a sample app I made then its telling GTLYouTube.h file missing.I am unable to know how that sample is working even though it does not have that file.
Second:-
Subsequently I added the downloaded file from svn checkout svn checkout http://google-api-objectivec-client.googlecode.com/svn/trunk/ google-api-objectivec-client-read-only and added the files in my app.
Then although the GTLYouTubeConstants.m is present as I can see in Services->Youtube->Generated I am getting error that GTLYouTubeConstants.m file not found.
I am unable to find while compiler is unable to find the file.Is there anything wrong in my implementation?
Finally I came up with the solution.I need to make a lot of changes in the code which I will write in steps so that it can be helpful for others.
The main problem I got in GTLYouTube_Sources.m,GTLCommon_Sources.m and GTLNetworking_Sources.m.When I used these files from the Sample App the files were missing and I was getting message like GTLYouTubeConstants.m file not found in GTLYouTube_Sources.m file.From the comments of developer in the GTLYouTube_Sources.m I came to know that I can't directly use these files.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
So I downloaded the files from svn checkout http://google-api-objectivec-client.googlecode.com/svn/trunk/google-api-objectivec-client-read-only and added the files in my app.Then again I got that error but when I removed the GTLYouTube_Sources.m,GTLCommon_Sources.m and GTLNetworking_Sources.m files form the project then the error gone(since I have already added the needed files).
Then again I got the duplicate symbol _OBJC_METACLASS_$ (linker error).Then I had to remove the GTLYouTube_Sources.m from Services->YouTube->Generated folder and the error gone.
I had made some other changes along with this:
I changed my header search path to same that used in Sample App.Also I changed my framework search path to $(SDKROOT)/Developer/Library/Frameworks $(inherited) $(DEVELOPER_FRAMEWORKS_DIR) and I removed all the test files and didn't use any test framework as we can see in the downloaded files.
May be my solution is not proper but it let the code running so please suggest me any improvement needed.

"Groovy:unable to resolve class ..." (import error in LoginController.groovy)

I am trying to use the ":spring-security-core:2.0-RC2" (using Grails version 2.3.1), but have my own LoginController.groovy. Following Burt's notes (here and here), I copied the LoginController.groovy from the original location at "myapp\target\work\plugins\spring-security-core-2.0-RC2\grails-app\controllers\grails\plugin\springsecurity" to my project location at "myapp\grails-app\controllers\com\company". Now I get a bunch of import error messages like "Groovy:unable to resolve class ..." (I have attached am image below showing all the imports giving errors). How do I take care of these errors?
Sorry if this is a trivial question (still getting used to Grails), and thank you for the help!
It looks like GGTS/STS isn't entirely aware that the plugin is installed, since those classes are from the two jars that the plugin depends on. Try right-clicking the project node in the tree and running Grails Tools > Refresh Dependencies. If that's not enough, run Project | Clean to force a full recompile.

Resources