Posts

Angular - apollo-client/core/types.d.ts (17,45): ',' expected

Problem: Starting problems while using the apollo graphQL client:

$ npm install apollo-client apollo-angular graphql-tag --save

(...)

$ npm start

(...)

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (17,45): ',' expected.

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (17,47): '>' expected.

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (19,2): ';' expected.

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (19,4): Expression expected.

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (20,10): Expression expected.

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (20,5): Cannot find name 'data'.

ERROR in /(...)/node_modules/apollo-client/core/types.d.ts (20,12): Cannot find name 'T'.

ERROR in /(...)/node_modules/apollo-client/data/mutationResults.d.ts (8,48): ',' expected.

ERROR in /(...)/node_modules/apollo-client/data/mutationResults.d.ts (8,50): '>' expected.

ERROR in /(.…

Angular - UNMET PEER DEPENDENCY apollo-client@1.9.0-0

Problem: Adding apollo GraphQL client to a Angular 4 application:
$ npm install apollo-client apollo-angular graphql-tag --save

UNMET PEER DEPENDENCY apollo-client@1.9.0-0
Solution: Update npm version
$ npm install -g npm

XSL - Transformer configuration exception error checking type expression funcall replace

Problem:javax.xml.transform.TransformerConfigurationException: Error checking type of the expression 'funcall(replace,
Solution:Make sure to be using an updated xsl transalation engine like, for instance, saxon 9.

Maven dependency:

<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.8.0-3</version>
</dependency>


Usage example:


XMLToCSVStyle.xsl




Terraform, AWS - aws Instance Profile already exists error

Problem"aws Instance Profile already exists error"

$ terraform --version
Terraform v0.9.8
Solution This is a know issue with terraform, see:
https://github.com/hashicorp/terraform/issues/3749 , read:
brikis98 commented on 4 Nov 2015

Update: it turns out that instance profiles don't show up in the AWS console. Well, they do, but only attached to a role. If you delete the role, but not the policy, then there is no longer a way to see the policy in the console.

Therefore, instead of using the console, you can use the AWS CLI to see all the instance profiles:

aws iam list-instance-profiles

With that command, I found the old, conflicting profiles, so the terraform error message was correct. Instructions for Ubuntu:
Install aws-cli$ sudo apt install python-pip$ pip install awscliUpdate pip$ pip install --upgrade pipConfigure aws-cli$ aws configureDelete the instance profile$ aws iam delete-instance-profile --instance-profile-name <instance_profile_name>

cannot locate the core snap: No such file or directory

Problem cannot locate the core snap: No such file or directory
Solution$ snap listCheck for packages with "Notes" as broken$ snap remove <broken_package>$ sudo snap install <broken_package> Note: <broken_package> equals to "core" in this particular case.

Scala - cannot resolve symbol "toList"

Problem "cannot resolve symbol toList"
Solution




Play Framework - @helper custom @input text field

Target

SolutionRender the input text without the <dt> labels part of the play framework defaults by creating a file customfield.scala.html under app/view/helper:


Create a custom input text consctructor by adding a new file under app/view/helper:


Add the following to your templates


Last, call the custom constructor via: