Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Uncaught Error: Cannot find module 'underscore' #89

Closed
arlo-j opened this issue Jan 30, 2015 · 6 comments
Closed

Uncaught Error: Cannot find module 'underscore' #89

arlo-j opened this issue Jan 30, 2015 · 6 comments

Comments

@arlo-j
Copy link

arlo-j commented Jan 30, 2015

Great starter kit, but one issue I've run into is after running gulp production with no errors, I try to run the contents of /build in browser and get Uncaught Error: Cannot find module 'underscore'.

Help?

@greypants
Copy link
Contributor

Have you pulled in the last couple days? This was issue #87 - it should be fixed in this commit from a couple days ago: 8ab54ca

Lemme know if you're still having issues since that update.

@arlo-j
Copy link
Author

arlo-j commented Feb 2, 2015

I pulled the latest version, and now get this (completely fresh project, no modifications) when running npm install:

    throw err;
          ^
Error: Cannot find module './fs.js'
    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> (/usr/local/Cellar/node/0.10.22/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
    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)```

@arlo-j
Copy link
Author

arlo-j commented Feb 2, 2015

Further notes, this is apparently an issue with two conflicting installs of Node. Not to do with your code (but maybe handy in case someone runs into it in the future). Wierd that this didn't happen last week when I didn't encounter this error... haven't done anything different since then.

npm/npm#6348 (comment)

@arlo-j
Copy link
Author

arlo-j commented Feb 2, 2015

Conclusive notes: still have console error 'cannot find module "underscore"' after running index.html within build following 'gulp production.'

@greypants
Copy link
Contributor

Hmm. I'll reopen for now until I can look into this further. I recommend using nvm for managing multiple versions of node if you're not already.

@greypants greypants reopened this Feb 2, 2015
@greypants
Copy link
Contributor

Underscore is no longer a dependency in 2.0 (merging soon)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants