在Linux Mint上运行TypeScript编译器时出现“require.paths已删除”错误

时间:2012-12-24 16:41:26

标签: node.js installation npm typescript

我是Node.js的新手。我在Linux Mint上运行节点0.9.5-pre。我使用npm(1.1.70)安装TypeScript但是现在运行tsc时出现以下错误:

Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
    at Function.Object.defineProperty.get (module.js:386:11)
    at Object.<anonymous> (/home/rolyp/bin/tsc@0.8.0:4:21)
    at Module._compile (module.js:454:26)
    at Object.Module._extensions..js (module.js:472:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:497:10)
    at process._tickCallback (node.js:334:13)

我收集了最新版本的Node不支持require.paths。似乎有几个相关的现有问题,但我不能很好地理解这个问题,以便利用答案。

我尝试删除〜/ .node_modules,但这没有帮助。

有人可以解释一下这个问题,并指出我的解决方案吗?

感谢

1 个答案:

答案 0 :(得分:0)

  

我有节点0.9.5-pre

在0.9官方发布时修复了测试版中的错误