polymer-cli build fails for element starter template - polymer

I am trying to create a reusable component using polymer cli.
I would like to use this component into another project where i can include it as a single file import.
But when I am trying to build the project, it keeps failing.
Below are details of my environment.
$node --version
v4.6.0
$ npm --version
2.15.9
$ polymer --version
0.16.0
$ polymer init
? Which starter template would you like to use? element
info: Running template element...
? Element name (my-el)
$polymer build
$ polymer build
info: Building application...
info: Generating build/unbundled...
info: Generating build/bundled...
error: Uncaught exception: Error: file path is not in root: /Users/yogeshkulkarni/workspace/polymer/polymer/polymer.html (/Users/yogeshkulkarni/workspace/polymer/my-el)
error: Error: file path is not in root: /Users/yogeshkulkarni/workspace/polymer/polymer/polymer.html (/Users/yogeshkulkarni/workspace/polymer/my-el)
at Object.urlFromPath (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/path-transformers.js:41:15)
at StreamAnalyzer.getFile (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:107:39)
at StreamResolver.accept (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/lib/analyzer.js:210:34)
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/loader/file-loader.js:64:27)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/polymer-build/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)
polymer-cli build works fine when I choose application starter template. Is polymer-cli doesn't support building element starter template?

I had similar problems. I used the polymer INIT - 'a blank application template', to create my project.
Which didn't provide a polymer.json configuration file. I added and configured this file. Now polymer BUILD is without any errors (in my project). Because polymer BUILD needs to know about your project structure. See https://www.polymer-project.org/1.0/toolbox/server

The docs for polymer-cli state:
This command is for app projects only.
And it currently doesn't provide a user-friendly error message for this scenario, so you'll see it crash with a stack trace when building element projects.

Related

React Native, Invariant Violation: Native component for "AIRMap" does not exist

I'm trying to install react-native-maps
I followed the document for installation.
My install process was like below.
I used react-native link instead of cocoaPod.
npm i react-native-maps --save
myProj.xcodeproj/Libraries => Add files to "myProj" click
add myProj/node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj
myProj click => Build Phases, Link Binary with libraries => add libArMaps.a
react-native link react-native-maps
However, build failed.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/dadumvu/work/foodup-mobile-RN/ios/build/Build/Intermediates.noindex/AirMaps.build/Debug-iphonesimulator/AirMaps.build/Objects-normal/x86_64/AIRGoogleMapPolygonManager.o AirGoogleMaps/AIRGoogleMapPolygonManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
My version's here.
"react-native-maps": "^0.21.0"
"react-native": "0.55.4"
If anyone could solve this issue, please let me know about it.
Thank you.
like this How to fix"AIRMap" was not found in the UIManager error in react native?
Add to ios/YOUR_PROJECT_NAME/AppDelegate.m
#import GoogleMaps; //add this line if you want to use Google Maps
and
[GMSServices provideAPIKey:#"_YOUR_API_KEY_"]; // add this line using the api key obtained from Google Console

Error when trying to Scaffold a model

I'm building a Razor Page app using ASP.NET 2017. When I run the command
dotnet aspnet-codegenerator razorpage -m Activity -dc CongContext -udl -outDir Page\Activities --referenceScriptLibraries
This error appears:
Could not load file or assembly 'Microsoft.EntityFrameworkCore,
Version=2.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I stopped and restarted VS, I've also cleaned and build the solution. Attached jpg shows the code I typed and the results
This is because of different versions of packages. Check the 'Dependencies' node of your project. The Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Design must have same 2.0.3 versions.
If not, delete and re-add them from [Tools] menu > [Nuget Package Manager]. Also delete the Migrations folder and repeat instructions as listed here. For more info, you may take a look at this comment

3rd party Framework Library not loaded: 'Image not found'

I am upgrading a framework to latest version. Earlier integration (>2 years old) had framework directly copied in the project; now getting cocoapod (0.39.0) to get framework integrated with project using xcode (7.2.1) and objective-c project.
Upon run, it generates following error:
dyld: Library not loaded: #rpath/name.framework/name
Referenced from:
/Users/xyz_xyz/Library/Developer/CoreSimulator/Devices/xxxxxxx/data/Containers/Bundle/Application/xxxxxxx/appname.app/appname
Reason: image not found
"Pod" xcode-project has correct reference and framework is present in corresponding folder
Found that nameFramework isn't linked (added) in any of the build phases. I am new to using cocoapods and not sure what changes would be necessary in Xcode build settings to make transition from directly-embedded framework to cocoapods based integration.
how to get past "dyld: Library not loaded" error?
What phase should I use to reference name.Framework during build as it's not getting generated?
How to copy bundle resources from Pod to project? Dragging-n-drop Pods/name/Resources/name.bundle prompts "copy item if needed" dialog. <- I don't think I need to do this when using cocoapods.
[update] Integration using cocoapods works fine when a sample or new project is used. It's something in the current project settings that's causing the issue.
Podfile:
platform :ios, '8.0'
# use_framework for swift based pod integration. requires cocoapod 0.39.0
#use_frameworks!
pod 'GTMOAuth2'
pod 'Typhoon'
pod 'Alamofire'
# Issue with name
pod 'name', podspec:'https://customers.pspdfkit.com/cocoapods/.../latest.podspec'
target :ABC do
pod '...', '~>1'
end
target :XYZ do
pod '...', :path => 'submodules/...'
end
[Update]
- Upgraded to CocoaPods 1.0.1 & modified the Podfile to uncomment use_frameworks!, and make other changes that are required for 0.39.0 to 1.0.1 migration. Here is the updated Podfile.
platform :ios, '8.0'
# use_framework is required for dynamic links (swift) based pod integration.
use_frameworks!
target 'XYZ' do
pod 'GTMOAuth2'
pod 'Alamofire'
pod 'name', podspec:'https://customers.name.com/cocoapods/.../latest.podspec'
target :XYZ-A do
pod 'XYZ-iOS-SDK', :path => 'submodules/xyz-ios-sdk'
end
end
Fixed errors such as following by adding $(inherited) flag (where applicable)
[!] The XYZ-v2 [Release] target overrides the OTHER_LDFLAGS build setting defined in ...
Progress after above changes, Pods/Target Supported Files/XYZ-v2/ has Pods-XYZ-v2-frameworks.sh and resources.sh; earlier frameworks.sh was missing. Following is partial content of the framworks.sh, and it does contain copy instructions.
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GTMOAuth2/GTMOAuth2.framework"
install_framework "$BUILT_PRODUCTS_DIR/GTMSessionFetcher/GTMSessionFetcher.framework"
install_framework "$BUILT_PRODUCTS_DIR/GoogleAPIClient/GoogleAPIClient.framework"
install_framework "$BUILT_PRODUCTS_DIR/Mantle/Mantle.framework"
install_framework "${PODS_ROOT}/PSPDFKit/PSPDFKit.framework"
install_framework "$BUILT_PRODUCTS_DIR/SSKeychain/SSKeychain.framework"
fi
// and for "Release" & "Distribution" as well..
Now I am trying to resolve compile errors upon build, which are related to static vs dynamic library includes.
/path../Pods/SSKeychain/Sources/SSKeychain.h:65:1: Duplicate interface definition for class ‘SSKeychain'
[Updated] Posted a new question: CocoaPods 1.0.1 Redefinition of 'XYZ', Redefinition of enumerator 'ABC', Duplicate interface definition for 'MNO'
Related:
OS X Framework Library not loaded: 'Image not found'
Seems relevant: https://github.com/CocoaPods/CocoaPods/issues/4772
Try using use_frameworks! (it's currently commented out). PSPDFKit is a dynamic framework, so you need to enable this option.
Also try it with the newest Xcode and CocoaPods >= 1.0.0. Older versions might not work correctly.
You can find more information about PSPDFKit integration via CocoaPods here: https://pspdfkit.com/guides/ios/current/getting-started/using-cocoapods
If all of this doesn't help you can reach the PSPDFKit developers directly at https://pspdfkit.com/support/request
same issue on dyld: Library not loaded: #rpath/TwilioAccessManager.framework/TwilioAccessManager
Reason: image not found
I had the same problem, this fixed it for me.I Changed Framework status required to optional .

Polymer starter kit unit testing

I'm trying out polymer-starter-kit for the first time. Using yeoman generator I have scaffolded the basic project. When I run the unit test using Web Component Tester, am getting the following error.
Error: Could not request headers from http://selenium-release.storage.googleapis.com/2.47/IEDriverServer_x64_2.46.0.zip
Following is the stdout when I run gulp test:local
[12:39:44] Using gulpfile
~\tryout\js\polymer\admin-portal-client\gulpfile.js [12:39:44]
Starting 'wct:local'... Starting Selenium server for local browsers
---------- selenium-standalone installation starting
--- selenium install: from: http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar
to:
C:\Users\ninpv1\tryout\js\polymer\admin-portal-client\node_modules\web-component-tester\node_modules\wct-local\node_modules\selenium-standalone.selenium\se
lenium-server\2.47.1-server.jar
--- chrome install: from: http://chromedriver.storage.googleapis.com/2.16/chromedriver_win32.zip
to:
C:\Users\ninpv1\tryout\js\polymer\admin-portal-client\node_modules\web-component-tester\node_modules\wct-local\node_modules\selenium-standalone.selenium\ch
romedriver\2.16-x64-chromedriver
--- ie install: from: http://selenium-release.storage.googleapis.com/2.47/IEDriverServer_x64_2.46.0.zip
to:
C:\Users\ninpv1\tryout\js\polymer\admin-portal-client\node_modules\web-component-tester\node_modules\wct-local\node_modules\selenium-standalone.selenium\ie
driver\2.46.0-x64-IEDriverServer.exe
--- File from http://chromedriver.storage.googleapis.com/2.16/chromedriver_win32.zip
has already been downloaded
--- File from http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar
has already been downloaded [12:40:10]
'wct:local' errored after 26 s
[12:40:10] Error: Could not request headers from
http://selenium-release.storage.googleapis.com/2.47/IEDriverServer_x64_2.46.0.zip:
Node version : v0.12.7
npm version : 2.11.3
OS : Windows 7
What could be wrong ?
Because this file http://selenium-release.storage.googleapis.com/2.47/IEDriverServer_x64_2.46.0.zip doesn't exist on that link. Just try to browse it on your browser on all 3 files. You will find this is the only one that doesn't exist. However, http://selenium-release.storage.googleapis.com/2.47/IEDriverServer_x64_2.47.0.zip does exist.
Update: Looks like someone already opened an issue.
https://github.com/Polymer/web-component-tester/issues/206

MSDeploy gulp build package

Is it possible to deploy a Single Page App project build using grunt to IIS using MSDeploy from TeamCity? The project is not any kind of Visual Studio solution and doesn't get built using MSBuild.
My Command parameters which are not working are:
-source:package='%teamcity.build.checkoutDir%\Dist.%build.number%.zip' -dest:auto,computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -setParamFile:"%teamcity.build.checkoutDir%\Dist.%build.number%.zip.SetParameters.xml"
-AllowUntrusted -setParam:"IIS Web Application Name"="%system.WebSiteName%" -verbose
The error I am getting is:
[11:47:31][Step 3/3] Error Code: ERROR_EXCEPTION_WHILE_CREATING_OBJECT
[11:47:31][Step 3/3] More Information: Object of type 'package' and
path 'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' cannot
be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.
[11:47:31][Step 3/3] Error: The Zip package
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' could not
be loaded. [11:47:31][Step 3/3] Error: Could not find file
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip'.
[11:47:31][Step 3/3] Error count: 1. [11:47:31][Step 3/3] Process
exited with code -1 [11:47:31][Step 3/3] Step Deploy (Command Line)
failed
My build process is working as I end up with the correct artefacts, I just don't seem to be able to deploy my generated artefacts using MSDeploy
This is a screenshot of my artefacts:
I managed to get this working by changing my parameters to the following:
-source:iisapp='%teamcity.build.checkoutDir%\dist' -dest:iisapp='C:\www\xxxx-website',computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -AllowUntrusted -verbose
And changing my user to an admin user rather than an IIS user. Note use of iisapp - the key was to read the MSDeploy api using msdeploy -help
FYI - a good test is to use the intended command against msdeploy.exe in console and check output errors then push command into teamcity when it's working.
I created a grunt and gulp plugin to do just what you are looking to do. gulp-mswebdeploy-package and grunt-mswebdeploy-package will create a ms webdeploy package from any folder and do not require your build to be running on windows.
https://www.npmjs.com/package/gulp-mswebdeploy-package
https://www.npmjs.com/package/grunt-mswebdeploy-package