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


Gergely Szabo
Gergely Szabo
6,082 Points

NPM run build problem

Dear Treehouse,

Some problem happened to me when I tried to run the build script.

I got this: npm ERR! Failed at the treehouse-babel-template@0.0.1 build script 'babel src -d build'.

I have this in the package.json: "devDependencies": { "babel-cli": "^6.24.1", "babel-preset-es2015": "^6.24.1" }

Any idea what can cause this problem?

Thanks Gergo

1 Answer

Gergely Szabo
Gergely Szabo
6,082 Points

I had to install it globaly with:

npm install --global babel-cli

But somehow the package.json is still not working. If I type manually babel src -d build, It creates the build but with npm run It doesn't. Yet :)