Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDarren Cox
327 PointsHaving trouble installing npm on my mac
0 info it worked if it ends with ok 1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ] 2 info using npm@2.11.3 3 info using node@v0.12.7 4 verbose readDependencies loading dependencies from /Users/darrencox/Desktop/package.json 5 error install Couldn't read dependencies 6 verbose stack Error: ENOENT, open '/Users/darrencox/Desktop/package.json' 6 verbose stack at Error (native) 7 verbose cwd /Users/darrencox/Desktop 8 error Darwin 14.5.0 9 error argv "node" "/usr/local/bin/npm" "install" 10 error node v0.12.7 11 error npm v2.11.3 12 error path /Users/darrencox/Desktop/package.json 13 error code ENOPACKAGEJSON 14 error errno -2 15 error package.json ENOENT, open '/Users/darrencox/Desktop/package.json' 15 error package.json This is most likely not a problem with npm itself. 15 error package.json npm can't find a package.json file in your current directory. 16 verbose exit [ -2, true ]
any help would be great
4 Answers
David Tonge
Courses Plus Student 45,640 PointsOk. Try running the foundation-apps command from within the foundation directory you created on your desktop(if that's where it is). I'm reading the stack trace and it looks like you tried running the command from your Desktop and not within your folder. Basically, npm needs to read your package.json file to know what dependancies to install.
David Tonge
Courses Plus Student 45,640 PointsAccording to the message it says that npm is already install. Could you provide a little more information as to what you were trying to do when you encountered the message?
Darren Cox
327 PointsHi David,
I am trying to set up a foundation app. I set up the folder on my desktop. there was an error in the terminal saying try install npm. I will go through the steps again tomorrow and send you a screen shot.
Cheers for getting back so soon
Jeremy Stewart
19,676 PointsI get a similar error when I run the command foundation-apps in the directory of my test app. Please help
Error: Cannot find module 'multimatch'
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> (/Users/jeremystewart/Desktop/Discvr/node_modules/gulp-load-plugins/index.js:2: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)
Error: foundation-apps-template@1.1.0 start: gulp
Exit status 8
at EventEmitter.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:214:16)
at EventEmitter.emit (events.js:98:17)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)