Why is npm giving weird errors? - npm

I'm trying to install redux using npm, but upon running the command npm install redux, I get the following error:
bash-3.2$ sudo npm install redux
> fsevents#1.1.2 install /Users/prikshetsharma/Downloads/server/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-no\
de-v72-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.2 and node#12.10.0 (node-v72 ABI) (falling back to \
source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.\
1.2-node-v72-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.2 and node#12.10.0 (node-v72 ABI) (falling back to \
source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:197:
In file included from ../../nan/nan_converters.h:59:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local
version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
val->To ## TYPE(v8::Isolate::GetCurrent()->GetCurrentContext()) \
^
<scratch space>:19:1: note: expanded from here
ToBoolean
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8.h:2536:3: note: 'ToBoolean' has been
explicitly marked deprecated hereIn file included from
../fsevents.cc:6:
In file included from ../../nan/nan.h:197:
In file included from ../../nan/nan_converters.h:59:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean V8_DEPRECATED("ToBoolean ca\
n never throw. Use Local version.",can
^never
throw. Use Local
version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8config.h::\
12311:: 29note:: expandednote : fromexpanded macrofrom 'X'macro
'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
val->To ## TYPE(v8::Isolate::GetCurrent()->GetCurrentContext()) \
^
<scratch space>:19:1: note: expanded from here
ToBoolean
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8.h:2536:3: note: 'ToBoolean' has been
explicitly marked deprecated here
V8_DEPRECATED("ToBoolean can never throw. Use Local version.",In file included from
^
../fsevents.cc:6:
In file included from ../../nan/nan.h:197:
In file included from ../../nan/nan_converters.h:59:
../../nan/nan_converters_43_inl.h:40:1: warning: /Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node\
/v8config.h:'BooleanValue'311 :is29 :deprecated: noteBooleanValue: expandedcan fromnever macrothrow.
Use'V8_DEPRECATED'
Isolate version. [-Wdeprecated-declarations]
declarator __attribute__((deprecated(message)))
^
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \
^
<scratch space>:26:1: note: expanded from here
BooleanValue
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8.h:2574:3: note: 'BooleanValue' has been
explicitly marked deprecated here
V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
^
/Users/prikshetsharma/Library/Caches/node-gyp/12.10.0/include/node/v8config.hIn file included from :../fsevents.cc3\
11::629:
: In file included from note../../nan/nan.h: :197expanded:
In file included from from../../nan/nan_converters.h: 59macro:
../../nan/nan_converters_43_inl.h :'V8_DEPRECATED'40
:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use
Isolate version. declarator __attribute__((deprecated(message)))[-Wdeprecated-declarations]
^
X(bool, Boolean)
^
The real output is actually ten times longer, but I think you get the picture. How to fix this? Node version: 12.10.0. Npm version: 6.11.3.

Try this it should work.
npm install fsevents#1.2.9
I have tried this and using this versions
node -v => v12.18.0 and npm -v => 6.14.9

I got same issue, and the fix is the right node version to use with.
First time I get gyp ERR! node -v v13.3.0, then fix with nvm install v8.9.4
So I suggest to use node under nvm and try older node version!

Related

"Module build failed..." in Laravel Mix

I did not change anything in app.scss, but when I run npm run watch I get the following errors:
error in ./resources/sass/app.scss
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Unsupported operation: Cannot extract a file path from a URI with a fragment component
# ./resources/sass/app.scss 2:14-254
Asset Size Chunks Chunk Names
/js/app.js 2.46 MiB /js/app [emitted] /js/app
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
undefined
^
Join(null, "variables"): part 0 was null, but part 1 was not.
#import 'variables';
^^^^^^^^^^^
stdin 2:9 root stylesheet
in C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\resources\sass\app.scss (line 2, column 9)
at runLoaders (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\webpack\lib\NormalModule.js:30
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\Loader
13)
Any help appreciated.
Finally found the issue. It is related to dart-sass being used instead of node-sass with laravel-mix v4.x.x.
Turns out something related to dart-sass or laravel-mix does not work well with paths containing a '#' symbol. In your case, your app is located at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro and the #Coding folder is creating the error.
Either move your app somewhere else without a '#' symbol in the path OR enable node-sass again by following the steps from laravel-mix 4.0.0 release notes:
you can manually switch back to node-sass, like so:
npm install node-sass
mix.sass('resources/sass/app.sass', 'public/css', {
implementation: require('node-sass')
});
in your webpack.mix.js write the code
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css');

No available mirrors for yaml-cpp

I'm trying to install mongodd using yaourt on archlinux which require the yaml-cpp lib to be installed.
The thing is, yaourt is unable to find a valid mirror to download from
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from ftp.swin.edu.au : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from ftp.acc.umu.se : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from mirror.neuf.no : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from mirrors.ustc.edu.cn : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from mirror.23media.de : The requested URL returned error: 404
(4/4) checking keys in keyring [##############################] 100%
(4/4) checking package integrity [##############################] 100%
error: yaml-cpp: signature from "Levente Polyak (anthraxx) <levente#leventepolyak.net>" is invalid
I tried building the lib manually from source and putting it in /usr/lib but it doesn't work either.
What can I do here ?
Thanks
You must update your Arch Linux before installing any new package.
The following command are fine:
pacman -Syu followed by pacman -S yaml-cpp
pacman -Syu yaml-cpp
You must not do this (it may break your system):
pacman -Sy followed by pacman -S yaml-cpp
pacman -Sy yaml-cpp

Ninja not found by CMake

I'm trying to build some code I got from GitHub using CMake, but keep getting the followings errors:
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/golang/project/src/github.com/devsisters/goquic/libquic/build/debug/CMakeFiles/2.8.11/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/golang/project/src/github.com/devsisters/goquic/libquic/build/debug/CMakeFiles/2.8.11/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
How do I set these variables correctly?
I used a ./build_libs.sh file that came with the GitHub code to build this.
The script you are executing uses the CMake Ninja generator. For that to work you need Ninja on the path. On most Linux distributions you can install it from a package.
Ubuntu: ninja-build
openSUSE: ninja
If you can't find it for your distribution, you have to download it and add its location to the path environment variable.
My solution: symlink "ninja-build" to "ninja".
# ln -s /usr/bin/ninja /usr/bin/ninja-build
This only works on very old versions of CMake, which I will explain below.
I had already dropped my fresh "ninja" binary into /usr/bin and checked it had 0755 permissions. I was stumped until I ran an strace on the generator command.
# strace cmake -GNinja .. | grep -i ninja
access("ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/sbin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/sbin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/texlive/2016/bin/i386-linux/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/root/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
It was looking for "ninja-build", not "ninja"!
I use CMake with Ninja extensively at work and at home, on Windows and Linux. So why haven't I seen this bug before?
Well... in this instance I'm using a very old version of CMake, version 2.8.12. It's so old it's almost fossilised. So presumably it's either a CMake bug which was fixed later, or the Ninja project changed the name of the binary at some point.
In Debian/Ubuntu systems, go ahead and install it
apt install ninja-build
Then rerun CMake.
If ninja really exists in $PATH and it still does not work, you should check the permission of the executable file via ls -l /PATH/TO/NINJA. Make sure others have read and execute permissions (like '-rwxr-xr-x').
See also: 0013910: Ninja generator initialization fails if /usr/bin/ninja is not world-readable
You may still suffer
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
even you already have::
put ninja in your PATH
ninja executable with proper privilege
newer version of cmake**
Then it might because -D CMAKE_MAKE_PROGRAM and -G Ninja are specified at the same time but CMAKE_MAKE_PROGRAM with invalid value (such as empty).
For example
Android Studio with gradle plugin version :
classpath 'com.android.tools.build:gradle:7.0.0-alpha03'
and not using SDK Manager provided cmake, by:
put cmake executable in PATH environment variable
put ninja executable in PATH environment variable
specify cmake version equal to the one in PATH, in modules's build.gradle, like:
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.19.1" // this line
}
}
Then actually gradle calling cmake like this:
cmake ^
-HD:\dev\android_cv_examples\HelloNDK7\app\src\main\cpp ^
-DCMAKE_SYSTEM_NAME=Android ^
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ^
-DCMAKE_SYSTEM_VERSION=26 ^
-DANDROID_ABI=arm64-v8a ^
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a ^
-DANDROID_NDK=D:\soft\Android\ndk-r21b ^
-DCMAKE_ANDROID_NDK=D:\soft\Android\ndk-r21b ^
-DCMAKE_TOOLCHAIN_FILE=D:\soft\Android\ndk-r21b\build\cmake\android.toolchain.cmake ^
-DCMAKE_MAKE_PROGRAM= ^
-DCMAKE_C_FLAGS= ^
-DCMAKE_CXX_FLAGS=-std=c++11 ^
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\dev\android_cv_examples\HelloNDK7\app\build\intermediates\cmake\debug\obj\arm64-v8a ^
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\dev\android_cv_examples\HelloNDK7\app\build\intermediates\cmake\debug\obj\arm64-v8a ^
-DCMAKE_BUILD_TYPE=Debug ^
-BD:\dev\android_cv_examples\HelloNDK7\app\.cxx\cmake\debug\arm64-v8a ^
-GNinja ^
-DANDROID_PLATFORM=android-24
Note: If removing previous cmake build cache, and modify that calling script by deleting -DCMAKE_MAKE_PROGRAM then problem will be solved.
I am using Mac Monterey. I put ninja into /Applications and /Users/USER/Applications and made sure $PATH was pointing to these directories, but no luck.
I only made CMake discover Ninja by installing it via homebrew:
brew install ninja
My issue was fixed by upgrading CMake to the latest version as specified in this answer:
https://askubuntu.com/a/865294/924090
This was apparently an issue in CMake that is now fixed in the latest version. More information here:
https://gitlab.kitware.com/cmake/cmake/-/issues/21486
At U20 was resolved for me only when using "pip install ninja" rather than "sudo apt install ninja-build"

Getting hundreds of errors when running 'sudo yo meanjs'

I am attempting to work through the following tutorial: http://www.bradoncode.com/tutorials/mean-stack-tutorial-part-1-setup/
to teach my self MEAN stack development. All of the packages seem to be installed correctly as far as I can tell.
When I run 'sudo yo mean js' I get over 500 lines of errors and warnings (more than I can put in a post here). The following are the first hundred or so in hopes that someone can see the pattern and point me in the right direction.
Not sure if this is relevant but it probably takes around 10 to 15 minutes for 'sudo yo meanjs' to return these errors.
Much thanks in advance!
Error: Command failed: /bin/sh -c cd mean && npm install
npm WARN deprecated phantomjs#2.1.3: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt'
npm WARN deprecated lodash#0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs#2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN prefer global jshint#2.8.0 should be installed with -g
npm WARN prefer global nodemon#1.9.0 should be installed with -g
npm WARN prefer global node-gyp#3.3.0 should be installed with -g
npm WARN prefer global node-inspector#0.10.2 should be installed with -g
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../../nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../../nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
V8_INLINE Local(S* that)
^
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:414:12: note: in instantiation of function template specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:424:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1514:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1632:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
^
../../nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
9 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/christopherward/MeanStackTutorial/NorthwindNode/mean/node_modules/bufferutil
gyp ERR! node -v v4.3.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:bufferutil#1.1.0 bufferutil#1.1.0 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.1.0 Exit status 1
./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw { dev: 16777218,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 19122429,
size: 1318,
blocks: 8,
atime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST),
mtime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST),
ctime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST),
birthtime: Tue Feb 23 2016 12:32:42 GMT-0800 (PST) }
./Release/.deps/Release/obj.target/validation/src/validation.o.d.raw { dev: 16777218,
mode: 33188,
nlink: 1,
uid: 501,
gid: 20,
rdev: 0,
blksize: 4096,
ino: 19122463,
size: 1318,
blocks: 8,
atime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST),
mtime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST),
ctime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST),
birthtime: Tue Feb 23 2016 12:32:51 GMT-0800 (PST) }
In file included from ../src/validation.cc:15:
../../nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../../nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../../nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/christopherward/.node-gyp/4.3.1/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/validation.cc:15:
../../nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
V8_INLINE Local(S* that)
^
In file included from ../src/validation.cc:15:
../../nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
In file included from ../src/validation.cc:7:
/Users/christopherward/.node-gyp/4.3.1/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
generator-meanjs is only compatible with lower versions of Node (0.12.10) and NPM as of now.
To get it resolved, you have to downgrade your node, npm and meanjs generator versions. There is no implementation of sub generators such as CRUD or Vertical modules in latest version of generator-meanjs.
If you have latest version of node installed - then you will end up with tons of errors. If you really want to use mean js generators I recommend you to downgrade your node version. (I prefer nvm - node version manager).
Check your generator version - npm view generator­meanjs versions and downgrade to 0.12.x version of generator.
The versions should be,
Node - 0.12.x
Npm - 2.x
generator-meanjs - 0.12.x
Once you are done, there will be no problem to use the fabulous MEAN stack generator.

Install error: ftheader.h: No such file or directory

When I am trying to build matplotlib-1.3.1, I am getting the below freetype header errors. Probably it is not finding the ftheader.h. Any idea on how to solve this problem?
NOTE: I just installed Freetype-2.5.0.1 following the instructions as mentioned in
FreeType Install because manually building Matplotlib-1.3.1 from source was failing due to the required package 'freetype' which was not found initially.
In file included from src/ft2font.h:16,
from src/ft2font.cpp:3:
/usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
In file included from src/ft2font.cpp:3:
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:69,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42,
from ./CXX/Python2/Exception.hxx:46,
from ./CXX/Exception.hxx:40,
from ./CXX/Python2/Objects.hxx:44,
from ./CXX/Python2/Extensions.hxx:52,
from ./CXX/Extensions.hxx:40,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:91: error: expected template-name before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:91: error: expected ‘{’ before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:91: error: expected unqualified-id before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:390: error: expected template-name before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:390: error: expected ‘{’ before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:390: error: expected unqualified-id before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:474: error: expected template-name before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:474: error: expected ‘{’ before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:474: error: expected unqualified-id before ‘<’ token
I tried running sudo yum install *-devel on a fresh vm which has neither numpy/scipy/matplotlib installed; but get the below error message which I received also on my previous VM image. Is it a problem specific to the VM I am using? Note: I am using Hortonworks Sandbox v1.3 over Oracle VirtualBox VM
Error: metis conflicts with cmake-2.6.4-5.el6.x86_64
Error: php-pecl-apcu conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
Error: cpupowerutils-devel conflicts with cpufrequtils-devel-007-6.el6.x86_64
Error: Package: libgendersplusplus-1.20-1.el6.x86_64 (HDP-epel)
Requires: libgenders(x86-64) = 1.20-1.el6
Installing: libgenders-1.14-2.el6.rf.x86_64 (HDP-UTILS-1.1.0.15)
libgenders(x86-64) = 1.14-2.el6.rf
Error: zeromq3-devel conflicts with zeromq-devel-2.2.0-4.el6.x86_64
Error: Package: rubygem-passenger-devel-3.0.21-5.el6.x86_64 (HDP-epel)
Requires: rubygem(passenger) = 3.0.21-5.el6
Available: 1:rubygem-passenger-3.0.12-1.el6.x86_64 (HDP-UTILS-1.1.0.15)
rubygem(passenger) = 3.0.12
Error: Package: libgenders-devel-1.20-1.el6.x86_64 (HDP-epel)
Requires: libgenders(x86-64) = 1.20-1.el6
Installing: libgenders-1.14-2.el6.rf.x86_64 (HDP-UTILS-1.1.0.15)
libgenders(x86-64) = 1.14-2.el6.rf
Error: php-pecl-apcu-devel conflicts with php-pecl-apc-devel-3.1.9-2.el6.x86_64
Error: Package: libgenders-devel-1.20-1.el6.x86_64 (HDP-epel)
Requires: libgenders(x86-64) = 1.20-1.el6
Available: libgenders-1.14-2.el6.rf.x86_64 (HDP-UTILS-1.1.0.15)
libgenders(x86-64) = 1.14-2.el6.rf
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Viewing the source tree under /usr/share/doc gives an estimate of the packages and their versions that come pre-installed in the sandbox. Note: You can clearly see freetype-2.3.11 in the list and lots of other lib packages which may be conflicting when *-dev is installed
acl-2.2.49 foomatic-db-4.0 libedit-2.11 mpfr-2.4.1 python-setuptools-0.6.10
acpid-1.0.10 fping-2.4b2 libffi-3.0.5 mx4j-3.0.1 python-urlgrabber-3.9.1
alsa-lib-1.0.22 freetype-2.3.11 libfontenc-1.0.5 mysql-5.1.69 qt3-3.3.8b
apache-tomcat-apis-0.1 fuse-2.8.3 libgcc-4.4.7 mysql-connector-java-5.1.17 qt4
apr-1.3.9 gamin-0.1.10 libgcrypt-1.4.5 mysql-libs-5.1.69 qt-4.6.2
apr-util-1.3.9 gawk-3.1.7 libgomp-4.4.7 mysql-server-5.1.69 readline-6.0
at-3.1.10 gcc-4.4.7 libgpg-error-1.7 nagios-3.2.3 redhat-logos-60.0.14
atk-1.28.0 gd-2.0.35 libgudev1-147 nagios-plugins-1.4.9 redhat-release
attr-2.4.44
For Mac OS 10.6.8
sudo ln -s /usr/X11/include/freetype2/freetype /usr/X11/include/.
Seems to do the trick... If you look at the /usr/X11/include/ft2build.h it seems as though it is really a problem with that header file and the way free type is installed, not a matplotlib problem.
Once installed (properly) the development package, the Freetype headers shall be in $(includedir)/freetype/freetype2 and $(includedir)/freetype2/freetype/config, with the only exception of ft2build.h which is in $(includedir).
It seems from the message you showed that indeed there is a ft2build.h file in /usr/include (a natural place for $(includedir)), yet the rest of the headers are not at the correct place.
I do not know exactly how to correct this since it is probably an issue with your particular distribution and the way you installed it, but I feel the most natural fix is to uninstall (properly) the freetype-dev[el] package, then re-install it, using of course the distribution-provided version which matches your installed .so, apparently 2.3.11.
Installing Freetype 2.5.0.1 will not help you until you successfully build the library, then install it in your system successfully; only then you will have the headers installed in $(includedir) and its sub-directories.
For RHEL use below command :
yum install freetype-devel -y
For Ubuntu use below command:
apt-get install libfreetype-dev -y