这个问题已经在bug reports中被引用了,但是这个问题似乎没有得到解决。有几个软件包需要contextify,它似乎不是基于Ubuntu和Node8.x构建的
在npm install各种包上,我得到以下错误:
make: Entering directory '/src/node_modules/contextify/build'
CXX(target) Release/obj.target/contextify/src/contextify.o
../src/contextify.cc: In static member function 'static v8::Local<v8::Context> ContextWrap::createV8Context(v8::Local<v8::Object>)':
../src/contextify.cc:131:68: warning: 'v8::Local<v8::Object> v8::Function::NewInstance() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> wrapper = Nan::New(constructor)->NewInstance();
^
In file included from /root/.node-gyp/8.10.0/include/node/v8.h:26:0,
from /root/.node-gyp/8.10.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/root/.node-gyp/8.10.0/include/node/v8.h:3851:52: note: declared here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
/root/.node-gyp/8.10.0/include/node/v8config.h:318:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/contextify.cc:150:16: error: 'class v8::ObjectTemplate' has no member named 'SetAccessCheckCallbacks'
otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,环境为:
Ubuntu Xenial 16.04
Node v8.10.0发布于 2018-04-18 23:36:54
在mac上的节点9.11.1上也发生了同样的错误,我唯一能处理的方法是:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
不要忘记将以下内容添加到.bash_profile中
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"如果您需要最新的nvm install node
nvm install v6.9.5,请在您的文件夹nvm use v6.9.5 中按--version
npm install仔细检查nvm install v6.9.5https://stackoverflow.com/questions/49188238
复制相似问题