8

I'm looking to check out Mike Bostock's Rivers, but I'm running into an error with Node.js. npm install gives me:

module.js:340
    throw err;
          ^
Error: Cannot find module 'ansi'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/Cellar/node/0.10.0/lib/node_modules/npm/node_modules/npmlog/log.js:5:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Any pointers? Or, any previous questions I missed that might point to a solution?

4

2 回答 2

1

如果你在 RH CentOS 上运行 Fedore 重新安装

yum 重新安装 nodejs-ansi.noarch

这解决了我的类似问题

于 2013-10-22T15:56:21.773 回答
-2

你可以运行:

npm install ansi -g

使 ansi 在全球范围内可用(您可能必须使用sudo

于 2016-07-12T11:01:05.567 回答