Search code examples
node.jssocketstream

I'm getting following error while using node.js with socketstream."throw new Error("Cannot find module '" + x + "'")"


I'm using node.js with socketstream..I'm getting following error while running my

"appln.Cannot find module '/entry' [Break On This Error]

throw new Error("Cannot find module '" + x + "'")

           NewNodeProject
 client
   -code
      -app
      -libs 
   -css
      -libs
 static
 templates
 views
   -app.html
 node_modules
   -express
   -socketstream
 server
   -rpc
      -user.js
   -app.js

Solution

  • The solution here is to use SocketStream's generator to generate the application folders and files, so that no files/folders are accidentally missed out:

    socketstream new <project_name>
    

    You can pass the following flags with this command:

    -c    (use CoffeeScript versions of the application's files)
    -m    (generate the application without the demo code files)
    -j    (use jade's templating system for the view & template files)