Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7737603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:02:51+00:00 2026-06-01T08:02:51+00:00

I am new to node, npm, socket.io. Found many guides that are fairly useful,

  • 0

I am new to node, npm, socket.io. Found many guides that are fairly useful, but I am encountering some errors which I don’t understand the cause, hopefully you can help me out.

npm install socket.io -g

returns …

npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm ERR! error installing socket.io@0.9.4
npm ERR! error rolling back socket.io@0.9.4 Error: EACCES, unlink   '/usr/local/lib/node_modules/socket.io/.npmignore'
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/socket.io/.npmignore'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 10.8.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" "-g"
npm ERR! cwd /Users/Kinglee
npm ERR! node -v v0.6.14
npm ERR! npm -v 1.1.0-beta-4
npm ERR! path /usr/local/lib/node_modules/socket.io/.npmignore
npm ERR! code EACCES
npm ERR! message EACCES, unlink '/usr/local/lib/node_modules/socket.io/.npmignore'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Kinglee/npm-debug.log

however when i did npm install socket.io, there was no error, everything was fine.

Sorry forget to add this info here …

I actually tried sudo npm install socket.io and it installed without error but when i try to cd ~/node_modules, I don’t see socket.io, this cause 'socket.io not found' error when i try to do require('socket.io') as I follow this tutorial here (http://blog.koostudios.com/?p=470)

Kind of confused fellow here :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:02:52+00:00Added an answer on June 1, 2026 at 8:02 am

    The most important portion is:

    EACCES, unlink   '/usr/local/lib/node_modules/socket.io/.npmignore'
    

    This means you do not have permission to delete this file.

    I assume this means you ran the command as your standard user account, which will not have write permission into /usr/.

    Prepend sudo to your command to re-run the command with administrator privileges:

    sudo npm install socket.io -g
    

    Your local configuration may not have /usr/local/lib/node_modules/ in node‘s default module loading locations. The module loading path is controlled via the NODE_PATH environment variable (before starting node) or the require.paths variable (once node is running). Because I prefer to keep local configuration separated from the program, I’d prefer to set the environment variable to modify paths, though the other mechanism may be useful for long-lived applications that must remain up even when the environment changes. (This is definitely an advanced use.)

    To change the NODE_PATH variable for a single instance, sh and its derivatives will let you simply add NODE_PATH=/path before the command. For example, change:

    node ./foo.js
    

    to

    NODE_PATH=/usr/local/lib/node_modules ./foo.js
    

    If you have multiple directories, use the standard :-separated directories, just as you would for PATH:

    NODE_PATH=/usr/local/lib/node_modules:/home/sarnold/node_modules ./foo.js
    

    To make this persistent, use the shell’s export builtin to export the value of the NODE_PATH variable to all children and place the modification in your shell’s start up files, such as ~/.bashrc:

    export NODE_PATH=/usr/local/lib/node_modules
    

    This will take effect in all new shells automatically. You can source this file into currently-running shells if you don’t wish to restart them:

    source ~/.bashrc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm fairly new to node.js and I've found its quite complicated separating a project
I want to create new node of BeanTreeView, and when I add some node
I'm pretty new to Node.js/Express, but I think I'm slowly getting the hang of
So I'm new to OAuth and Node.JS, but I have to create a Flickr
I use JTree with TreeNode which extending DefaultMutableTreeNode.when I add new node,i cant update
I have a Node class that has an 'element' slot which contains a list
I'm trying to add a new node to an jQuery SimpleTree , but all
I am trying to create a new node type like this: http://www.live-wtr.ru/leo/Tikz9.png but don't
I am trying to create a new node that is a child of an
I am trying to programmatically add a new XLink node to an XDocument but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.