static-react icon indicating copy to clipboard operation
static-react copied to clipboard

Compilation fails

Open jikkujose opened this issue 8 years ago • 4 comments

First of all, thanks for the plugin! Was looking for this for long! But somehow, I am unable to compile components, it errors as follows:

/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395
          throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname));
          ^

Error: Couldn't find preset "es2015" relative to directory "/Users/jikkujose/ReactJS/scrap/static-react"
    at /Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:387:20)
    at OptionManager.mergePresets (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:10)
    at OptionManager.mergeOptions (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:330:14)
    at OptionManager.addConfig (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:232:10)
    at OptionManager.findConfigs (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:436:16)
    at OptionManager.init (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:484:12)
    at compile (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-register/lib/node.js:112:69)
/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395
          throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname));
          ^

Error: Couldn't find preset "es2015" relative to directory "/Users/jikkujose/ReactJS/scrap/static-react"
    at /Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:387:20)
    at OptionManager.mergePresets (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:10)
    at OptionManager.mergeOptions (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:330:14)
    at OptionManager.addConfig (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:232:10)
    at OptionManager.findConfigs (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:436:16)
    at OptionManager.init (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:484:12)
    at compile (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-register/lib/node.js:112:69)
    at loader (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-register/lib/node.js:158:14)
    at loader (/Users/jikkujose/ReactJS/scrap/static-react/example/node_modules/babel-register/lib/node.js:158:14)


npmnpm ERR! ERR! Darwin 15.4.0
 Darwin 15.4.0
npmnpm  ERR!ERR!  argv "/usr/local/Cellar/node/5.11.0/bin/node" "/usr/local/Cellar/node/5.11.0/bin/npm" "run" "start"
argv "/usr/local/Cellar/node/5.11.0/bin/node" "/usr/local/Cellar/node/5.11.0/bin/npm" "run" "start"
npm ERR!npm ERR!  node v5.11.0
node v5.11.0
npm npm ERR!ERR!  npm npm  v3.10.3
 v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! code ELIFECYCLE
npmnpm  ERR!ERR! [email protected] start: `static-react components/Root.js > index.html`
 [email protected] start: `static-react components/Root.js > index.html`
npm ERR!npm ERR! Exit status 1
 Exit status 1
npm npm ERR!ERR! 

npmnpm ERR! ERR! Failed at the [email protected] start script 'static-react components/Root.js > index.html'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
 Failed at the [email protected] start script 'static-react components/Root.js > index.html'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR!npm ERR! If you do, this is most likely a problem with the static-react-demo package,
 If you do, this is most likely a problem with the static-react-demo package,
npmnpm  ERR!ERR! not with npm itself.
 not with npm itself.
npm npm ERR!ERR! Tell the author that this fails on your system:
npm Tell the author that this fails on your system:
npm ERR! ERR!     static-react components/Root.js > index.html
     static-react components/Root.js > index.html
npmnpm  ERR!ERR! You can get information on how to open an issue for this project with:
 You can get information on how to open an issue for this project with:
npm npm ERR!ERR!     npm bugs static-react-demo
     npm bugs static-react-demo
npmnpm  ERR!ERR! Or if that isn't available, you can get their info via:
 Or if that isn't available, you can get their info via:
npmnpm  ERR!ERR!     npm owner ls static-react-demo
     npm owner ls static-react-demo
npmnpm  ERR!ERR! There is likely additional logging output above.
 There is likely additional logging output above.


npm ERR! Please include the following file with any support request:
npm ERR! Please include the following file with any support request:
npm ERR!npm ERR!     /Users/jikkujose/ReactJS/scrap/static-react/example/npm-debug.log
     /Users/jikkujose/ReactJS/scrap/static-react/example/npm-debug.log

jikkujose avatar Jul 07 '16 07:07 jikkujose

I'm experiencing the same issue @JikkuJose described.

bellizio avatar Jul 12 '16 15:07 bellizio

Try fixed instructions in #6. These worked for me.

anglepoised avatar Jul 28 '16 08:07 anglepoised

I had the same error, and resolved it with:

npm i -D babel-preset-es2015 babel-preset-react babel-preset-stage-0

duhaime avatar Nov 22 '16 14:11 duhaime

@duhaime 's fix worked for me.

danhollick avatar Apr 05 '17 07:04 danhollick