json - Node.JS can't find node-schedule module -


ok i've read tens of similar questions none have been able fix problem - because think problem bit deeper.

i have several modules working fine on server (nodejitsu) think installed same way was: npm install express/connect/mongojs etc...

in server.js :

var express = require('express'); var team = require('./team'); var users = require('./users'); var scheduler = require('node-schedule'); 

now i'm trying node-schedule module work installed via npm while in directory of server.js file module indeed enters node_modules folder when deploy app this:

error:   module.js:340 error:       throw err; error:             ^ error:   error: cannot find module 'node-schedule' error:       @ function.module._resolvefilename (module.js:338:15) error:       @ function.module._load (module.js:280:25) error:       @ module.require (module.js:364:17) error:       @ require (module.js:380:17) error:       @ object.<anonymous> (/opt/run/snapshot/package/server.js:5:1) error:       @ module._compile (module.js:456:26) error:       @ object.module._extensions..js (module.js:474:10) error:       @ module.load (module.js:356:32) error:       @ function.module._load (module.js:312:12) error:       @ function.module.runmain (module.js:497:10) 

i think problem have package.json file pretty empty:

 {       "name": "weplay",       "subdomain": "weplay",       "scripts": {         "start": "node server.js"       },       "version": "0.0.0-203",       "engines": {         "node": "0.10.x"       } } 

now have in node_modules folder several modules mentioned (express,mongojs..) , work fine when deploy, though not mentioned in package.json file - new module, nothing... i've tried (based on past threads) install -g , still nothing, i've tried linking it, nothing...

i see there problem because when try deploy app see app deploying:

connect@2.7.3 node_modules/connect ├── fresh@0.1.0 ├── pause@0.0.1 ├── cookie-signature@0.0.1 ├── bytes@0.2.0 ├── buffer-crc32@0.1.1 ├── cookie@0.0.5 ├── debug@0.7.2 ├── send@0.1.0 (range-parser@0.0.4, mime@1.2.6) ├── formidable@1.0.11 └── qs@0.5.1  express@3.2.2 node_modules/express ├── methods@0.0.1 ├── fresh@0.1.0 ├── range-parser@0.0.4 ├── cookie-signature@1.0.1 ├── qs@0.6.3 ├── buffer-crc32@0.2.1 ├── cookie@0.0.5 ├── debug@0.7.2 ├── commander@0.6.1 ├── mkdirp@0.3.4 ├── send@0.1.0 (mime@1.2.6) └── connect@2.7.8 (pause@0.0.1, bytes@0.2.0, formidable@1.0.13)  nodemailer@0.4.4 node_modules/nodemailer ├── simplesmtp@0.3.1 (xoauth2@0.1.8, rai@0.1.7) └── mailcomposer@0.1.33 (mime@1.2.9, mimelib@0.2.12)  mongojs@0.7.5 node_modules/mongojs ├── thunky@0.1.0 ├── readable-stream@1.0.2 └── mongodb@1.3.6 (kerberos@0.0.2, bson@0.1.8) 

so node-schedule not there. can't seem understand a) how got original modules work, when server.js package.json empty... b) how can require not find when sitting right there, next express connect , mongojs...


Comments

  1. Thank you.Well it was nice post and very helpful information on Ruby on Rails Online Training Hyderabad

    ReplyDelete
  2. Great post! I am actually getting ready to across this information, It’s very helpful for this blog. Also great with all of the valuable information you have Keep up the good work you are doing well.

    Digital Marketing Training in Chennai

    Digital Marketing Course in Chennai


    ReplyDelete

Post a Comment

Popular posts from this blog

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -