eanplatter/enclave

Couldn't find preset "es2015"

Closed this issue · 7 comments

I get these errors when I run npm start:

Module build failed: Error: Couldn't find preset "es2015" relative to directory "/my-app/src"
...
/bin/sh: webpack-dev-server: command not found

Apologies if this is related to one of the other issues.

Are you sure that your enclave is pointing to the correct directory? Also, is your root my-app?

You can try changing your root in enclave.js to "./src/{your starting index.js file}" if that's the case and see what happens when you do npm start.

@ianwalter would you mind showing me what your enclave.js file looks like?

Which npm version are you using, @ianwalter? I've tried with version 2.x and didn't worked too. Try to upgrade to npm 3.x, it works for me.

@eanplatter Here is my enclave.js:

exports.entry = "./src/App.js"
exports.output = "dist"
exports.port = 8080
exports.index = "./src/index.html"
exports.live = true

@tonytainguyen That didn't work. I think it's pointing to the correct directory: my-app is the project root, and it contains the src directory where App.js and index.html reside.
@brunoskonrad Somehow I was on 2.x even though I thought I upgraded a couple months ago. I upgraded to latest 3.x and ran npm install but same error.

I started the process over again and get the same error but this time with the "stage-0" preset.
By the way, I copied App.js and index.html from the README. Node v4.1.1 and NPM 3.8.1, OS X Yosemite.

@ianwalter this issue may have been resolved already in a newer version, we've been ironing out some of the rough edges. Please feel free to make another issue if this is still happening. Gonna close it for now.

Will test again when I get a minute, thanks!

Thanks for being understanding :)