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 7803275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:31:40+00:00 2026-06-02T01:31:40+00:00

(javascript) Iv got an error in running a socket.io example from github https://github.com/LearnBoost/socket.io.git when

  • 0

(javascript)
Iv got an error in running a socket.io example from github
https://github.com/LearnBoost/socket.io.git

when i run -> node app.js
it says.
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.

can someone tell me whats wrong?
this error always comes out in every socket.io examples I’ve tried.

  • 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-02T01:31:42+00:00Added an answer on June 2, 2026 at 1:31 am

    I hit this issue while working with a cloud foundry sample. The offending line they told you to include was:

    require.paths.unshift('./node_modules')
    

    It’s apparently a way of telling node what path to search in for modules you require, in those cases where you don’t provide an explicit path. I read somewhere that’s when the string you pass in does not start with a dot or a slash.

    As far as I can tell it’s something that is required to make Node 0.4 applications search in the node_modules directory. But in Node 0.6 you’re supposed to sort this out with settings in your environment and path instead (though it seemed to work by default for me on an 0.6 install).

    I was having trouble because the cloud deployment was on Node 0.4 and my local development setup was on Node 0.6. Having the line crashed me locally, but leaving it out crashed on the cloud. My solution was to delete it and instruct the cloud to use 0.6 with:

    vmc push <appname> --runtime=node06
    

    Everything seemed to work after that. Even better: I found that you can edit your manifest.yml file to tell it do this automatically during the push with no command line switch needed:

    ---
    applications:
      .:
        name: myapp
        runtime: node06  # added this line
        framework:
          name: node
          info:
            mem: 64M
            description: Node.js Application
            exec: n
    

    (etc.)

    Incidentally…if it had been necessary to dual support older versions of node that needed require.paths as well, one could maybe run the line conditionally based on testing process.version:

    http://nodejs.org/docs/v0.4.9/api/process.html#process.version

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while using document cookie <script typ=text/javascript> document.domain=example.com; </script> I got an error.i don't know
I'm running some tests comparing the sha1 algorithm implemented in javascript - got from
While validating my JavaScript code in JSLint (www.jslint.com). I got a error I've never
I've got a Django template that initiates the Facebook OAuth process by doing: window.location='https://www.facebook.com/dialog/oauth?client_id=MY_CLIENT_ID&redirect_uri=http%3A//localhost%3A8000/fbpanel/explore-python'
I want to run Dojo/Dijit with the Google CDN: <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js> </script> I've
I'm building a JavaScript parser and got an error when testing it on jQuery
I'm using webview in my xcode javascript refuses to run. has anyone got any
I've got an Ajax.BeginForm on my page which on success should run a javascript
when ever i call a JavaScript function from asp:button onclick event i got this
I have been learning the Definitive Guide of JavaScript.i got a question about the

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.