简体   繁体   English

NodeJS - 设置mean.io无法找到模块错误

[英]NodeJS - setting up mean.io cannot find module errors

I'm sort of new to this whole "node" js thing. 我对这整个“节点”js的事情有点新鲜。 When trying to install the MEAN package from http://mean.io/ , I followed these steps faithfully: 在尝试从http://mean.io/安装MEAN软件包时,我忠实地遵循了以下步骤:

I "cd" to my directory, run "npm install", and then the "grunt" command, and get this error: 我“cd”到我的目录,运行“npm install”,然后运行“grunt”命令,并收到此错误:

Error: Cannot find module 'coffee-script'

So I roll with the punches. 所以我用拳打滚。 npm install coffee-script, run "grunt" again. npm安装coffee-script,再次运行“grunt”。

Error: Cannot find module 'getobject'

Ever patient, I decide "okay, forget grunt". 有耐心,我决定“好吧,忘了咕噜”。 I run "node server". 我运行“节点服务器”。 Then I get this error: 然后我收到这个错误:

Error: Cannot find module 'merge-descriptors'

What's wrong? 怎么了? How can I get MEAN working here? 我怎样才能让MEAN在这里工作? (I thought npm was supposed to make life easier). (我认为npm应该让生活更轻松)。

Update 12/31/13: When I look at the output of npm install, there are a number of "Error: EMFILE" errors. 更新12/31/13:当我查看npm install的输出时,会出现许多“Error:EMFILE”错误。 As I understand those errors are related to too many files being opened and graceful-fs is a solution to this. 据我所知,这些错误与打开的文件太多有关,而graceful-fs是解决这个问题的方法。 Sample EMFILE error pasted below: 下面粘贴了示例EMFILE错误:

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/cnokes/Desktop/mean-master
npm ERR! node -v v0.10.7
npm ERR! npm -v 1.2.21
npm ERR! path /Users/cnokes/Desktop/mean-master/node_modules/grunt/node_modules/iconv-lite/README.md
npm ERR! code EMFILE
npm ERR! errno 20
npm ERR! tar.unpack error reading /var/folders/wv/xrm8qphn5bsgfj5w45kqrwl9lgq2j2/T/npm-27019/1388513549132-0.22752901865169406/tmp.tgz

With graceful-fs installed, I re-run npm install and get a couple of these errors: 安装了graceful-fs后,我重新运行npm install并得到以下几个错误:

npm ERR! Error: ENOENT, utime '/Users/cnokes/Downloads/mean-master2/node_modules/express/node_modules/fresh/index.js'

I've run in to this and think this might be connected to another issue. 我参与其中并认为这可能与另一个问题有关。 Basically it's related to the number of open files (alot) that get open when we do a npm install. 基本上它与我们进行npm安装时打开的打开文件(很多)的数量有关。 It has been blogged about nicely here - http://otaqui.com/blog/1618/how-to-fix-error-emfile-too-many-open-files-from-yeoman-and-npm/ and I update the mean FAQ https://github.com/linnovate/mean/wiki/Faq 这里有很好的博客 - http://otaqui.com/blog/1618/how-to-fix-error-emfile-too-many-open-files-from-yeoman-and-npm/我更新了意思是FAQ https://github.com/linnovate/mean/wiki/Faq

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM