gpt4 book ai didi

node.js - 推送到 Heroku 错误 : contextify@0. 1.14 安装

转载 作者:太空宇宙 更新时间:2023-11-04 00:49:57 24 4
gpt4 key购买 nike

我是一名新的 Node.js 开发人员。我正在尝试将我的 Node.js 应用程序推送到 Heroku,但我不断收到如下错误,但不知道如何修复它。

-----> Building dependencies
Pruning any extraneous modules
Installing node modules (package.json)

> contextify@0.1.14 install /tmp/build_7fb89e69944f674de0fcbcbe650a0b7b/lucinkudumov-galdraland-dfa13e5/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild

(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
make: Entering directory `/tmp/build_7fb89e69944f674de0fcbcbe650a0b7b/lucinkudumov-galdraland-dfa13e5/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify/build'
CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:3:0:
../node_modules/nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:672:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
from ../src/contextify.cc:3:
/app/.node-gyp/4.1.2/src/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/app/.node-gyp/4.1.2/src/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/app/.node-gyp/4.1.2/src/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>

...

请帮助我。谢谢。

最佳答案

我已经解决了这个问题。Node 4.x 不支持 Contextify。所以我将 Node 降级到 0.10.x,然后工作正常。

对不起,我的噪音。

关于node.js - 推送到 Heroku 错误 : contextify@0. 1.14 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33082995/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com