最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Cannot find module "async" Error - Stack Overflow

programmeradmin5浏览0评论

I created a package.json file which contains the following data:

After that used the following mand:

    npm install 

After that my file directory looks like that:

As you can see "Async" has been installed. But still keep getting this error:

Can anyone help??

Edited: Overall view of the Directory

I created a package.json file which contains the following data:

After that used the following mand:

    npm install 

After that my file directory looks like that:

As you can see "Async" has been installed. But still keep getting this error:

Can anyone help??

Edited: Overall view of the Directory

Share Improve this question edited Aug 17, 2015 at 12:46 Skywalker asked Aug 17, 2015 at 11:33 SkywalkerSkywalker 5,20417 gold badges66 silver badges127 bronze badges 2
  • I can't see the async module inside the node_modules folder. What I see is that your main folder task-management has a different name from the one you gave to your package in the package.json file. Are you sure you're in the same directory? – Rodrigo Medeiros Commented Aug 17, 2015 at 11:38
  • @RodrigoMedeiros Apologies I have corrected my mistake. Please see the question. I am still getting the same error but you can see the Async in the node_module list. – Skywalker Commented Aug 17, 2015 at 12:14
Add a ment  | 

4 Answers 4

Reset to default 2

Erm, I might be crazy but I don't see async installed in the screenshot. Try to install it manually via npm install async.

You can try doing:

npm install async 

instead of:

npm install -g async

This might help you.

In my case npm install async was still throwing an error so I have done following:

1. brew uninstall --force node  (it deletes all node versions you have on puter)

2. brew doctor 

3. brew prune

4. brew install node

5. npm install async

For those who are silly just like me, I did

npm install aysnc

instead of

npm install async

Please mind the spelling

发布评论

评论列表(0)

  1. 暂无评论