首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >推送到Heroku错误: contextify@0.1.14安装

推送到Heroku错误: contextify@0.1.14安装
EN

Stack Overflow用户
提问于 2015-10-12 13:54:18
回答 2查看 188关注 0票数 1

我是一个新的node.js开发人员。我正试图将我的node.js应用程序推到Heroku,但我一直收到一些错误,如下所示,但我不知道如何修复它。

代码语言:javascript
复制
-----> 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>

..。

请帮帮我。谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-10-12 14:39:22

我已经解决了这个问题。节点4.x不支持Contextify。因此,我将节点降级为0.10.x,然后运行良好。

抱歉,我的声音。

票数 1
EN

Stack Overflow用户

发布于 2015-10-12 14:39:08

我的第一个想法是检查package.json文件并检查错误。还要检查您在package.json中包含的package.json,并确保它们是最新版本。

还有定义节点的最新版本 in package.json

Javascript /节点库可以定期更新,如果您正在学习教程,您可能需要更新一些包版本

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33082995

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档