【问题标题】:"require.paths is removed" error running TypeScript compiler on Linux Mint在 Linux Mint 上运行 TypeScript 编译器时出现“require.paths is removed”错误
【发布时间】:2012-12-11 00:27:15
【问题描述】:

我是 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.js 不支持 require.paths。似乎有几个相关的现有问题,但我对问题的理解不够充分,无法利用答案。

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

有人能解释一下问题并指出解决方案吗?

谢谢

【问题讨论】:

  • 我最好安装稳定版本(目前是 0.8.x)——nodejs.org/download
  • @elmigranto 嗯,解决了它。谢谢!

标签: node.js installation npm typescript


【解决方案1】:

我有节点 0.9.5-pre

0.9 正式版发布时修复的 beta 版本中的一个错误

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-02
    • 2012-11-04
    • 2015-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多