"no template named 'WeakCallbackData' in namespace 'v8'" 安装 npm 包时出错

"no template named 'WeakCallbackData' in namespace 'v8'" error when installing npm packages

某些依赖于 https://www.npmjs.com/package/fibers 的软件包无法安装并显示上述错误消息。特别是铁流星

纤维的主页指出:

meteor users please read this

If you're trying to get meteor running and you ended up at this page you're probably doing something wrong. Please uninstall all versions of NodeJS and Meteor, then start over. See meteor#5124 for more information."

不过好像用处不大。

有人建议在这里降级 node.js https://github.com/NativeScript/NativeScript/issues/2991

它确实有帮助,但有点乱,对吧?

受影响的节点版本:v7.2.0

Node v6.9.2 运行良好。

WeakCallbackData was removed 来自今年早些时候的 V8 API。由于此更改已在 Node 7 中生效,因此依赖 v8::WeakCallbackData 的包不再有效。您需要降级 Node 或等到 Meteor 支持 Node 7,即使用更新的 node-fibers 版本。