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 trial

JavaScript Angular Basics Setting Up an Angular Application Your First Angular Application

npm install is getting failed.

this is the error i am getting

photoblog@ build /Users/rashmi/photo_blog webpack

/Users/rashmi/photo_blog/config/common.config.js:13 return path.join.apply(path, [ROOT, ...pathParts]); ^^^

SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/Users/rashmi/photo_blog/config/release.config.js:5:22) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! photoblog@ build: webpack npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the photoblog@ build script.

1 Answer

Alexi O'Hearn
Alexi O'Hearn
3,662 Points

Which directory are you in when you run npm install? You need to make sure you are in the same directory as package.json before executing the command. Hope that helps!