browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

Watchify execution fails when I install Browserify first #60

Closed jgoux closed 9 years ago

jgoux commented 10 years ago

Hello, I have a weird behaviour when I want to execute watchify. If I install watchify first, and then browserify, I have no error. The error happens only when I install browserify first. This is problematic because I have those two modules in my project depencendies, so when I type 'npm install', browserify is always installed before watchify.

Here is the complete error :

module.js:340                                          
    throw err;                                             
    ^                                                                      
Error: Cannot find module 'browserify'
    at Function.Module._resolveFilename (module.js:338:15)                                                                            
    at Function.Module._load (module.js:280:25)                                    
    at Module.require (module.js:364:17)                                                    
    at require (module.js:380:17)                
    at Object.<anonymous> (/home/vagrant/node_modules/js/angulpify-test/watchify/index.js:3:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
jgoux commented 10 years ago

I made it "works" by adding the Browserify install command inside the postinstall key of my package.json.

"scripts": {
    "postinstall": "npm install browserify"
  }
zertosh commented 9 years ago

Weird dependency issues.

jondashkyle commented 9 years ago

Noticed this has been closed, but still encountering in here.

zertosh commented 9 years ago

@jondashkyle Can you open a new issue and provide some more context?