Cowboy-coder / bundle-up

An asset manager for nodejs
MIT License
56 stars 22 forks source link

Error: Cannot find module .. lib/bundle_up #38

Open satybald opened 10 years ago

satybald commented 10 years ago

I have a following issue running my node program with bundle up. I'd highly appreciate any hint in terms why that might happen.

 dust-mongo-express git:(master) ✗ node app
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/auth.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/checkin.js
js-bson: Failed to load c++ bson extension, using pure JS version
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/err.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/feed.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/geoQuery.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/home.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/index.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/manifest.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/map.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/pinShare.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/user.js
Found route: /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/routes/venueAdmin.js

module.js:340
    throw err;
          ^
Error: Cannot find module '/Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/node_modules/bundle-up/lib/bundle_up'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:362:17)
  at require (module.js:378:17)
  at Object.<anonymous> (/Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/node_modules/bundle-up/index.js:2:18)
  at Module._compile (module.js:449:26)
  at Object.Module._extensions..js (module.js:467:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:362:17)
  at require (module.js:378:17)
  at Object.<anonymous> (/Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/config/config.js:7:16)
  at Module._compile (module.js:449:26)
  at Object.Module._extensions..js (module.js:467:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:362:17)
  at require (module.js:378:17)
  at Object.<anonymous> (/Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/app.js:32:2)
  at Module._compile (module.js:449:26)
  at Object.Module._extensions..js (module.js:467:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.runMain (module.js:492:10)
  at process.startup.processNextTick.process._tickCallback (node.js:245:9)

I did ls command in directory and there's indeed no such file or dir in lib directory.

➜  dust-mongo-express git:(master) ✗ ls /Users/amandamariefernandez/Documents/projects/apple-hero/dust-mongo-express/node_modules/bundle-up/lib/           
assets_manager.coffee    bundle_up.coffee         css.coffee               helpers.coffee           otf_compiler.coffee
bundle.coffee            compiler.coffee          default_compilers.coffee js.coffee
satybald commented 10 years ago

I got it what was the issue with bundle-up. It seems that when the module installs it doesn't compile coffee scripts to JS in lib folder.

There's only coffee scripts files in the lib folder. I've compiled them locally to JS and the error passed away.