Angular basic tutorial do not work with Windows? - angularjs

I want to learn Angular so I started with there tutorial here, its really basic but that does not stop me from get ALOT of exception.
I installed latest and stable of every compinent Git, Node and python but when running
npm install
I got some exceptions, I then reinstalled components to a older specific version(no backward compability here). This got my a couple of steps but yet again other exceptions was thrown like this :
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(44,5): error MSB8020: The builds tools for v120 (Platform
Toolset = 'v12 0') cannot be found. To build using the v120 build
tools, either click the Proj ect menu or right-click the solution, and
then select "Update VC++ Projects..."
Why would it need MSBuild? Anyway, I changed the config like this
npm config set msvs_version 2012
And now I get even more exceptions!?, like these :
C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
bufferutil.cc
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(336): error C2988: unrecognizable template declaration/definition [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(336): error C2059: syntax error : 'using' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(469): error C2988: unrecognizable template declaration/definition [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(469): error C2059: syntax error : 'using' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(576): error C2061: syntax error : identifier 'WeakCallbackType' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(642) : see reference to class template instantiation 'v8::PersistentBase<T>' being compiled
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(637): error C2253: 'PersistentBase<T>' : pure specifier or abstract override specifier only allowed on virtual function [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(844): error C2253: 'Global<T>' : pure specifier or abstract override specifier only allowed on virtual function [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(847) : see reference to class template instantiation 'v8::Global<T>' being compiled
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(852): error C2988: unrecognizable template declaration/definition [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(852): error C2059: syntax error : 'using' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(915): error C2989: 'v8::HandleScope' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(319) : see declaration of 'v8::HandleScope'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(949): error C2989: 'v8::EscapableHandleScope' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(135) : see declaration of 'v8::EscapableHandleScope'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(979): error C2989: 'v8::Data' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(74) : see declaration of 'v8::Data'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(1118): error C2989: 'v8::Script' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(96) : see declaration of 'v8::Script'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(1559): error C2989: 'v8::StackTrace' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(101) : see declaration of 'v8::StackTrace'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(1622): error C2989: 'v8::StackFrame' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(100) : see declaration of 'v8::StackFrame'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(2031): error C2989: 'v8::Value' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(108) : see declaration of 'v8::Value'
Is it really supose to be this hard to install Angular on a Windows 8.1 computer? Or are my environment faulted in any way?
How do I solve this problem? Have search alot but no help.

I've installed Node/NPM/Angular on 4 differents machines of mine. This is what I've done to make it all work:
Visual C++ 2005
Visual C++ 2008
Visual c++ 2010
Python 2.7
I don't know why, I've just followed the console erros and all worked.

Yes, it is hard. The reason for this is that (dependend on the node modules you install) node-gyp rebuilds things to make them run on the platform, in your case Windows 8.
There are lots and lots of questions how to solve these kind of errors. Prepare yourself to install Python and Visual Studio like explained here.
Good luck! Working with node.js on Linux or OSX is much easier....

Related

Upgrading to maven-plugin-plugin 6.3.4 results in com.thoughtworks.qdox.parser.ParseException: syntax error

After upgrading maven-plugin-plugin from 3.6.0 to 3.6.4, I am getting a the following exception while the build creates the maven-plugin-descriptor:
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.4:descriptor failed: syntax error #[60,84] in file:/xyz/Foo.java
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
...
Caused by: com.thoughtworks.qdox.parser.ParseException: syntax error #[60,84] in file:/xyz/Foo.java
at com.thoughtworks.qdox.parser.impl.Parser.yyerror (Parser.java:1963)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse (Parser.java:2085)
at com.thoughtworks.qdox.parser.impl.Parser.parse (Parser.java:1944)
at com.thoughtworks.qdox.library.SourceLibrary.parse (SourceLibrary.java:232)
This is running with Maven 3.8.6.
The code compiles file - it's only when running through the org.apache.maven.plugins:maven-plugin-plugin:3.6.4:descriptor
Turns out this was related to using a restricted identifier (var, yield, record) as a method parameter. The underlying qdox parser seems to be more picky than the Java compiler in the regard.
Running Sonarlint on the file helped identify the issue. They provide a nice description in their java:S6213 rule.

Android Manifest merger error in Codename One

In a bare bones project, I added these build hints:
android.gradleDep=compile 'com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.5'
android.min_sdk_version=23
I would like to import the following Android library to make a CN1Lib (that requires at least Android SDK 23):
https://github.com/erikagtierrez/multiple-media-picker
To be short: I spent one day trying to import that, I also experimented with Android Studio and with suggestions found on Stack Overflow (trying to make a custom .aar), without success.
Could you help me to import that library? There is manifest merger error.
In fact, the issue reported by the build server is:
* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute application#label value=(BareBones) from AndroidManifest.xml:15:17-42
is also present at [com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.5] AndroidManifest.xml:23:9-41 value=(#string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:15:3-43:103 to override.
I also tried to add the build hint:
android.xapplication_attr=tools:replace="android:label"
as suggested by the previous error, without success.
In the last case, I get:
Merging result: ERROR
/tmp/build1659178556337293135xxx/Test/src/main/AndroidManifest.xml:15:3-43:103 Error:
tools:replace specified at line:15 for attribute android:label, but no new value specified
/tmp/build1659178556337293135xxx/Test/src/main/AndroidManifest.xml Error:
Validation failed, exiting
-- Merging decision tree log ---
The last full log is here: https://gist.github.com/jsfan3/dd6c23f86a2ac949f996910c8cece62b
Thank you
This is happening because our code things you injected android:label on your own and doesn't inject it to avoid collision...
Change the code to this:
android.xapplication_attr=tools:replace="android:label" android:label="App Name"

sendKeys(CharSequence[]) error

I have installed java JDK1.8.0_05. I am using selenium 2.50.0. I have entered below code:
username.sendKeys("Ashok");
and I got the error as below.
The type java.lang.CharSequence cannot be resolved. It is indirectly
referenced from required .class files
- The method sendKeys(CharSequence[]) from the type WebElement refers to the missing type CharSequence
Can anyone help me on this issue?
change your jre to 1.6 will be ok

Why c header file is not generated using ANTLR works 1.5?

I am trying to generate c code from ANTLR.grammar file, using antlrworks 1.5 (ANTLR 3.5) on windows, but it doesn't generate any header files, for example for sample.g it generates:
sample.tokens
sampleLexer.c
sampleParser.c
but not any header files and i can't figure out why.
The grammar what i am using now, is really simple for the sake of example:
grammar sample;
options
{
language = C;
}
rule1:
'ABC'
;
I also get warnings such:
[12:39:44] warning(24): template error: context [/outputFile /parser] 1:1 could not pass through undefined attribute filterMode
[12:39:44] warning(24): template error: context [/outputFile /parser /genericParser /_sub721 /ruleAttributeScopeFuncMacro] 1:4 no such property or can't access: null.attributes
[12:39:44] warning(24): template error: context [/outputFile /parser /genericParser] 155:5 no such property or can't access: null.apifuncs
[12:39:44] warning(24): template error: context [/outputFile /parser /genericParser /rule /ruleDeclarations] 4:1 no such property or can't access: null.attributes
[12:39:44] warning(24): template error: context [/outputFile /parser /genericParser /rule /ruleInitializations] 8:1 no such property or can't access: null.attributes
[12:39:44] warning(24): template error: context [/outputFile /lexer /lexerRule /ruleDeclarations] 4:1 no such property or can't access: null.attributes
I have find an article about similar warnings on stackoverflow:
numerous template errors generating OracleSQL grammar using Antlr-3.5-complete.jar
(this is the only thing i have found out about this and i think it may not do anything about header files not being generated)
I would appreciate any help, i would like to generate some AST trees for my c++ project from some sql grammar i have made a long ago for java, but im stuck by this interesting issue.
Note:
I have also checked out all these articles:
http://www.antlr.org/wiki/display/ANTLR3/FAQ+-+Getting+Started //Starting guide
http://www.antlr.org/wiki/pages/viewpage.action?pageId=728 //guide on how to install ANTLR
(Although im using antlrworks, so i dont really need any other installation)
http://www.antlr.org/wiki/pages/viewpage.action?pageId=29130826 //CplusTARGET (It doesn't have support for AST trees, that i have read it on stackoverflow, thats why i am trying c target now)
http://www.antlr.org/wiki/display/ANTLR3/Using+the+ANTLR3+C+Target //C TARGET
https://github.com/antlr/examples-v3 //Examples for targets
It's likely a side effect of a bug that's already been resolved for ANTLRWorks 1.5.1 (coming within the next ~week).
https://github.com/antlr/antlrworks/pull/9
I got the same problem with 1.5.0
Using 1.5.2 solves the problem. You can download it here http://www.antlr3.org/works/

Managed array issue in C++/CLI

compilng with /clr
array<Byte>^ byteArray = gcnew array<Byte>(25);
Why would I get these compiler errors?
error C2065: 'array' : undeclared identifier
error C2065: 'gcnew' : undeclared identifier
error C2275: 'System::Byte' : illegal use of this type as an expression
error C3192: syntax error : '^' is not a prefix operator (did you mean '*'?)
I am calling this method inside a class with
using namespace System;
__gc class MyClass
This feels like I am missing something very basic here. Even this causes errors:
array<Byte>^ byteArray;
or
array<Byte> * byteArray;
Thank you!!
The syntax __gc class was used in the, now obsolete, Managed C++. In C++/CLI, use ref class.
For more information see the section Syntax changes in the Wikipedia article C++/CLI.

Resources