NodeJS-设置mean.io找不到模块错误 [英] NodeJS - setting up mean.io cannot find module errors

查看:57
本文介绍了NodeJS-设置mean.io找不到模块错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对整个节点" js东西还是陌生的.尝试从 http://mean.io/安装MEAN软件包时,我忠实地遵循了以下步骤:

I'm sort of new to this whole "node" js thing. When trying to install the MEAN package from http://mean.io/, I followed these steps faithfully:

我"cd"到我的目录,运行"npm install",然后运行"grunt"命令,并出现以下错误:

I "cd" to my directory, run "npm install", and then the "grunt" command, and get this error:

Error: Cannot find module 'coffee-script'

所以我坚持不懈.npm安装coffee-script,再次运行"grunt".

So I roll with the punches. npm install coffee-script, run "grunt" again.

Error: Cannot find module 'getobject'

每个病人,我都决定好吧,忘记咕gr声".我运行节点服务器".然后我得到这个错误:

Ever patient, I decide "okay, forget grunt". I run "node server". Then I get this error:

Error: Cannot find module 'merge-descriptors'

怎么了?我怎样才能在这里工作?(我认为npm应该会让生活更轻松).

What's wrong? How can I get MEAN working here? (I thought npm was supposed to make life easier).

更新12/31/13:当我查看npm install的输出时,有许多错误:EMFILE"错误.据我了解,这些错误与打开的文件过多有关,因此graceful -fs是解决此问题的方法.EMFILE错误示例粘贴如下:

Update 12/31/13: When I look at the output of npm install, there are a number of "Error: EMFILE" errors. As I understand those errors are related to too many files being opened and graceful-fs is a solution to this. Sample EMFILE error pasted below:

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

在安装了graceful-fs之后,我重新运行npm install并收到以下几个错误:

With graceful-fs installed, I re-run npm install and get a couple of these errors:

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

推荐答案

我已经遇到了这个问题,并认为这可能与另一个问题有关.基本上,这与我们执行npm安装时打开的打开文件(alot)的数量有关.它已经在这里被很好地写了博客- https://github.com/linnovate/mean/wiki/Faq

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. 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

这篇关于NodeJS-设置mean.io找不到模块错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆