简体   繁体   中英

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

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM