Cannot find module 'node-proxy'

706 views
Skip to first unread message

jl

unread,
Jun 5, 2011, 3:30:45 PM6/5/11
to nowjs
I'm new to node.js and I would like to try "now"
i installed node, now ( npm install now )
when I start the server.js, I get this:

Error: Cannot find module 'node-proxy'
at Function._resolveFilename (module.js:322:11)
at Function._load (module.js:267:25)
at require (module.js:367:19)
at Object.<anonymous> (/home/jean-louis/node_modules/now/lib/
wrap.js:11:13)
at Module._compile (module.js:423:26)
at Object..js (module.js:429:10)
at Module.load (module.js:339:31)
at Function._load (module.js:298:12)
at require (module.js:367:19)
at Object.<anonymous> (/home/jean-louis/node_modules/now/lib/
nowServerLib.js:1:75)

I tried to install node-proxy via git clone .... but compil fails...

any hint ?
thanks
jlc

jl

unread,
Jun 6, 2011, 4:46:07 AM6/6/11
to nowjs
I found the answer to my own question,

I did npm install socketio and npm install now, made sure that files
were at the right location in the subfolder node_module and it
worked!
hope it helps someone,
jl

Eric Zhang

unread,
Jun 6, 2011, 5:37:31 PM6/6/11
to no...@googlegroups.com
Good to hear jl, thanks for sharing!


Eric

Sandeep Reddy

unread,
Jun 29, 2012, 9:34:21 AM6/29/12
to no...@googlegroups.com
Can you please share exactly how you fixed this issue.
i am also facing the same issue

i just executed npm install now in my app directory and i am getting this error when i run the app.js
when you say make sure the files wearer at the right location in subfoulder do we need to move any files in any of these default installing location like node_modules/now/ or some thing ?

Ian Serlin

unread,
Jun 29, 2012, 2:41:45 PM6/29/12
to no...@googlegroups.com
Hi Sandeep,

Your life will probably be easier if you maintain a package.json file in your app's root directory and then just use "npm install" which will inspect the package.json file for you than trying to install dependencies one by one.

Here's an example of what the package.json file should look like:

{
    "name": "application-name"
  , "version": "0.0.1"
  , "private": true
  , "dependencies": {
      "express": "2.5.8"
    , "stylus": ">= 0.0.1"
    , "jade": ">= 0.0.1"
    , "now": ">= 0.8.1"
    , "mongoose": ">= 0.0.0"
    , "instagram-node-lib": ">= 0.0.0"
    , "connect-session-mongo": ">= 0.0.0"
    , "express-mongoose": ">= 0.0.x"
    , "stripe": ">= 1.1.0"
    , "async": ">= 0.1.22"
  }
}

Hope that helps!
Reply all
Reply to author
Forward
0 new messages