如何补救“错误:找不到模块'child-process-close'"? [英] How do I remedy "Error: Cannot find module 'child-process-close'"?

查看:95
本文介绍了如何补救“错误:找不到模块'child-process-close'"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算照常营业,并要签出generator-angular-fullstack.

I was going about business as usual and about to checkout generator-angular-fullstack.

我没有出现红色错误,但最后却显示一条消息,内容为Error: Cannot find module 'child-process-close'.我尝试了许多操作-卸载节点,重新安装,手动删除本地和/或全局路径中的文件和目录,并尝试确保Homebrew是安装所有内容的人,并且以某种方式使事情变得更糟.

I got no red errors but a message at the end saying Error: Cannot find module 'child-process-close'. I tried many a-thing–uninstalling node, reinstalling, manually getting rid of files and directories in local and/or global paths and tried to make sure Homebrew was the one who installed everything and somehow I've made things worse.

(此外,我最初看到有关因果报应的错误.一切看起来都不错,但似乎我没有通过向其抛出命令来做任何事情.)

(Also, I initially saw errors regarding karma. Everything looked right but it doesn't seem I did any good by throwing commands at it.)

我很茫然.所有的stackoverflow问题都已被单击,恐怕我可能尝试了太多建议.我无法安装任何Yeoman发电机.我无法使用npm安装任何东西.当我运行npm install时在项目目录中时,它将引发错误.我真的没有头绪有没有一种方法可以让我从头开始?简单的卸载和安装并不能解决问题.系统中的某些内容需要更改,但是我不知道是什么.有什么想法吗?

I am at a loss. All the stackoverflow questions have been clicked and I'm afraid I've probably tried too many of the suggestions. I cannot install any Yeoman generator. I cannot install anything with npm. When inside the project directory when I run npm install it throws the error. I really have no clue. Is there a way I can basically start over all together? A simple uninstall and install isn't cutting it. Something in the system needs to change but I don't know what. Any ideas?

我没有关于如何最终使Node恢复工作状态的完整列表,但是这个自制"问题确实可以提供很多信息&乐于助人.我不知道我的权限是如何摆脱的,这很可能是我自己的错.但是,这并不能解决所有问题,我仍然遇到子进程关闭错误.通过查看NPM github上的问题,我发现了,其中介绍了如何手动删除软件包. tgz.短路运行rm /Users/tylersloan/.npm/connect/2.8.8/package.tgz.中提琴!

I don't have a thorough list of how I ended up getting Node back in working order, but this Homebrew issue was really informative & helpful. I don't know how my permissions got out of whack, it was likely my own fault. This didn't fix everything though, I was still getting child-process-close errors. Looking through issues on NPM's github, I found this, which tells how to manually remove package.tgz. The short is run rm /Users/tylersloan/.npm/connect/2.8.8/package.tgz. Viola!

推荐答案

您将要使用以下命令删除node_modules文件夹:

You’ll want to remove the node_modules folder using this command:

$ rm -rf /usr/local/lib/node_modules

然后重新安装node:

$ brew uninstall node
$ brew install node

这使npm复活.

这篇关于如何补救“错误:找不到模块'child-process-close'"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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