node-gyp

Node-gyp. MSBuild.exe` failed with exit code: 1

心已入冬 提交于 2021-02-10 18:36:20
问题 I was trying to install sharp module, which requires: c++ compiler - I downloaded Visual Studio 2017 and visual c++ build tools node-gyp - It was installed successfully But running 'npm install -g sharp' I got many errors gyp ERR! stack Error: E:\VS\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\MyUsername\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\li \build.js:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR!

Node-gyp and custom dependency / library / header install path

元气小坏坏 提交于 2021-02-09 12:25:27
问题 I have a build environment in which my libraries (and headers) are installed to a custom location. When installing a package from npm, modules that use node-gyp fail because they cannot find the libraries (or headers) I've installed. How can I make node-gyp aware of my custom install location (linux)? 回答1: If you set CXXFLAGS and LDFLAGS before npm install <pkg> in the same line, it seems to work: $ CXXFLAGS=-I/path/to/include LDFLAGS=-L/path/to/lib npm install <pkg> Alternatively you can

Invalid deployment target for -stdlib=libc++ on OSX 10.8

筅森魡賤 提交于 2021-02-07 14:36:34
问题 I am compiling through node-gyp a Node.JS package written in C++. When I compile it I receive the following error: clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later) . I'm running on OSX 10.8, and I have installed the XCode Command Line Tools. This is the file used by node-gyp to compile the package: { "targets": [ { "target_name": "package_name", 'type': 'executable', 'xcode_settings': { 'OTHER_CFLAGS': [ "-std=c++11", "-stdlib=libc++" ], }, "sources": [

node-gyp configure got “gyp ERR! find VS”

℡╲_俬逩灬. 提交于 2021-02-07 05:34:15
问题 I am trying to start about node c/c++ add-on. the node-gyp command got error I have installed vs2019, my command is node-gyp configure --msvs_version=2019 the verbose output is gyp info it worked if it ends with ok gyp info using node-gyp@5.0.3 gyp info using node@10.16.0 | win32 | x64 gyp info find Python using Python version 2.7.15 found at "C:\Users\seact\.windows-build-tools\python27\python.exe" gyp ERR! find VS gyp ERR! find VS msvs_version was set from command line or npm config gyp ERR

Unable to install npm package (kafka-streams)

☆樱花仙子☆ 提交于 2021-01-29 11:22:09
问题 I am trying to use npm package kafka-streams but getting below error: PS D:\Projects\POCs\kstreams-poc> npm install kafka-streams > node-rdkafka@2.7.1 install D:\Projects\POCs\kstreams-poc\node_modules\node-rdkafka > node-gyp rebuild D:\Projects\POCs\kstreams-poc\node_modules\node-rdkafka>if not defined npm_config_node_gyp (node "C:\Users\virtual\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:

Successful compiling the Node module and “Module did not self-register.”

时间秒杀一切 提交于 2021-01-28 19:32:18
问题 I decided to write a native module for Node using VS2015 compiler and node-gyp under Windows 8.1 32bit. I worked with the instructions from this page. I searched the internet (including StackOverflow) in search of a solution to my problem. I use following versions: Node: 4.6.0 Node-gyp: 3.4.0 The source code of the module: // main.c++ #include <node.h> #include <v8.h> void Method(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::Isolate* isolate = args.GetIsolate(); v8::HandleScope scope

'v8::Value::ToNumber': was declared deprecated

陌路散爱 提交于 2021-01-28 10:23:40
问题 I'm trying to access a known object and get one of its properties as a Number Unfortunately, the following code... Isolate *isolate = args.GetIsolate(); Local<Object> opts = args[0]->ToObject(); Local<Number> mode = opts->Get(String::NewFromUtf8(isolate, "mode"))->ToNumber(); is giving the following warning: warning C4996: 'v8::Value::ToNumber': was declared deprecated ....node-gyp\8.5.0\include\node\v8.h(9578): note: see declaration of 'v8::Value::ToNumber' In the v8.h I noticed the comment

Using Docker with nodejs with node-gyp dependencies

时光总嘲笑我的痴心妄想 提交于 2021-01-03 04:35:07
问题 I'm planning to use Docker to deploy a node.js app. The app has several dependencies that require node-gyp. Node-gyp builds these modules (e.g. canvas, lwip, qrcode) against compiled libraries on the delivery platform, and in my experience these builds can be highly dependent on the o/s version and libraries installed, and they often break a simple npm install . So is building my Dockerfile FROM node:version the correct approach? This seems to be the approach shown in every Docker/Node

Using Docker with nodejs with node-gyp dependencies

前提是你 提交于 2021-01-03 04:34:26
问题 I'm planning to use Docker to deploy a node.js app. The app has several dependencies that require node-gyp. Node-gyp builds these modules (e.g. canvas, lwip, qrcode) against compiled libraries on the delivery platform, and in my experience these builds can be highly dependent on the o/s version and libraries installed, and they often break a simple npm install . So is building my Dockerfile FROM node:version the correct approach? This seems to be the approach shown in every Docker/Node