eclipse-neon bower-install can't run due to error in the file - npm-install

I create javascript project and bower.json. After adding dependencies as follow gives me red-cross on project->bower_components->bootstrap->grunt->change-version.js file and query->src file:
"dependencies":{
"bootstrap":"~3.3.7"
}
This is first problem:
Description Resource Path Location Type
Expected name at 2:1 .eslintrc.json /gruntTest/bower_components/jquery/src line 2 JSON Problem
Second problem:
Description Resource Path Location Type
Unexpected token ILLEGAL change-version.js /gruntTest/bower_components/bootstrap/grunt line 1 JavaScript Problem

I assumed that eclipse neon doesn't need to download Nodeclipse & Enide and try to practice from scratch thats the reason error happened.
Nodeclipse & Enide must installed before practicing nodejs in eclipse.
I followed this link and worked great.
http://www.nodeclipse.org

Related

Print check_cxx_source_runs() detailed output

I have a find package module that utilizes check_cxx_source_runs() to test if package was loaded properly. However, it fails and I am not sure what causes it to.
Is there any way I can print the actual error (as one would see on terminal) from check_cxx_source_runs() rather than just the variable that tells success/failure?
I found the error output in "CMakeError.log" under the build directory.

Link to static JSON file

In Docusaurus V2 how to link to a JSON file in the static folder?
I tried the following in a markdown file:
An exemple, is the following [JSON dataset](../../static/data/solar-radiation.json).
But Docusaurus then produce the following error:
./static/data/solar-radiation.json (./node_modules/file-loader/dist/cjs.js?name=assets/files/[name]-[hash].[ext]!./static/data/solar-radiation.json)
Module parse failed: Unexpected token e in JSON at position 0 while parsing near 'export default __web...'
File was processed with these loaders:
* ./node_modules/file-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
SyntaxError: Unexpected token e in JSON at position 0 while parsing near 'export default __web...'
at JSON.parse (<anonymous>)
My file is a valid JSON. For some reason, instead of displaying a static file Docusaurus seems to try to parse it...
I saw the same problem. My temporary solution is:
Change file name from .md to .mdx
Add this link to your json file
<a target="_blank" href="/json/file.json" download="file.json">Download</a>
I've also had the same problem!
According to the Issue #3561 on the Docusaurus GitHub, word from one of the developers is that the current best practise is to use the pathname:// prefix in front of your URL. To use your example:
An exemple, is the following
[JSON dataset](pathname://../../static/data/solar-radiation.json).
Apparently the reason why this happens is because there is a conflict between the babel-loader (used to load code) and the file-loader (used to load static assets). The pathname:// prefix skips both of these loaders, and just creates a link instead.

LESS Compiler: Unexpected token u

When I attempt to compile a LESS template in Visual Studio using Web Essentials, I receive an error that says "Unexpected token u" with no file name, no line number, and no column number. Why is this happening?
Go to %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\12.0\Extensions which is the folder where per-user Visual Studio extensions reside. WebEssentials will be located in a subfolder with a randomly generated name.
From inside the WebEssentials folder, open up the file Resources\nodejs\tools\server\services\srv-less.js and go to line 65, which reads:
map = JSON.parse(output.map);
The problem is source map output may be the undefined value. JSON.parse can only parse strings, so it casts that to the string value "undefined" before parsing, but JSON does not recognize that as valid token. (It only understands the null value, not the undefined value.)
So... change line 65 to read:
map = JSON.parse(output.map || "null");
And voilà; LESS compilation on files with empty output works again.
Source:
https://github.com/madskristensen/WebEssentials2013/issues/1696
From my experience, this error occurs when LESS attempts to output a CSS file from a LESS file, and the resulting CSS file is empty. In my case, this happened after removing some font-face declarations, which left the resulting CSS file empty. LESS would not compile until I added a class that would output to the CSS file.
Details may be found here: https://github.com/madskristensen/WebEssentials2013/issues/1696
I'm adding this to StackOverflow because I'm unable to access Github at my workplace. I hope this helps someone.
You can also add in your less file an important comment /**/ or #charset "utf-8"; as described here https://github.com/madskristensen/WebEssentials2013/issues/1696

Testing net/http?

I am a little confused about how to structure a go web app and its tests. I have read the How to Write Go Code but still don't get it. For example, I have a go project called "beacon" with a beacon.go file at the root. Adding a trivial beacon_test.go file (copied verbatim from http://golang.org/pkg/net/http/httptest/#example_Server) causes this error:
$ go test
# github.com/jelder/beacon
./beacon_test.go:11: main redeclared in this block
previous declaration at ./beacon.go:216
FAIL github.com/jelder/beacon [build failed]
Sure enough, line 11 is func main(). If I instead change the package main line in my beacon_test.go to package hello, I get this error instead:
can't load package: package github.com/jelder/beacon: found packages main (beacon.go) and hello (beacon_test.go) in /Users/jacob/src/github.com/jelder/beacon
beacon_test.go has also a function called main() rename it to TestFirst (or any other name you like as long as it starts with Test, note the uppercase T is important). There is no need for that. Just run go test . from inside the package you are working on (the one containing the *.go files). Post the full files if you need more help.

Objective C, CABase.h file error

I hate Xcode 4! It crashes all the time and finally it gives me an error in CABase.h file which is an library header file that I am not allowed to modify..
I don't even know how this file is broken.
How to fix this problem? It complains like
"Expected *before*
Expected '=',',',';','asm' or '_attribute_' before 'extern'
Also, how can I completely remove Xcode on my Mac and re-install?
You probably just have a simple error, perhaps in a header which is included prior to CABase.h. Use a "divide and conquer" strategy to locate it.
To answer your last question:
$ sudo /Developer/Library/uninstall-devtools –mode=all
This happened to me just because I had the letter 's' at the beginning of one of my implementation files. I must have missed the cmd key when cmd+s for saving the file. Luckily, another compile error discovered this and removing the 's' fixed both errors.
For example,
s//
// GraphingViewController.m