These are chat archives for redfin/react-server

23rd
Jun 2016
Douglas Wade
@doug-wade
Jun 23 2016 17:59
hey gang, I’m having some trouble figuring out what’s wrong with my lerna build
I’m looking at redfin/react-server#302
The error is Error: Couldn't find preset "react-server" relative to directory "/home/travis/build/redfin/react-server/packages/react-server-cli”
Which is true — I repro it!
I’m not building or compiling anything, though; the preset is just a static index file
And when I repro locally, there just isn’t a directory called babel-preset-react-server in my node_modules at all
dougwade packages/react-server-cli ‹use-babel-preset-in-cli*› » ls node_modules/babel-preset-react-server
ls: cannot access 'node_modules/babel-preset-react-server': No such file or directory
I repro the failure with a npm run nuke && npm run bootstrap
Douglas Wade
@doug-wade
Jun 23 2016 18:04
Errored while running BootstrapCommand.execute
Error: Command failed: npm install lodash@^4.8.2 q@^1.4.1 react@~0.14.2 react-dom@~0.14.2 react-server@../react-server react-server-cli@../react-server-cli rimraf@^2.5.2 superagent@1.2.0
(node:52824) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:52825) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/Users/doug.wade/code/react-server/packages/react-server-cli/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 "react-server" relative to directory "/Users/doug.wade/code/react-server/packages/react-server-cli"
    at /Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:395:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:387:20)
    at OptionManager.mergePresets (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:10)
    at OptionManager.mergeOptions (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:330:14)
    at OptionManager.addConfig (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:232:10)
    at OptionManager.findConfigs (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:436:16)
    at OptionManager.init (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:484:12)
    at compile (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-register/lib/node.js:112:69)
    at loader (/Users/doug.wade/code/react-server/packages/react-server-cli/node_modules/babel-register/lib/node.js:158:14)
Bo Borgerson
@gigabo
Jun 23 2016 20:45
:eyes:
Bo Borgerson
@gigabo
Jun 23 2016 21:03
Okay, @doug-wade... it looks like that branch is failing in a few ways.
Douglas Wade
@doug-wade
Jun 23 2016 21:03
?
Bo Borgerson
@gigabo
Jun 23 2016 21:03
Each time I fix one I run into another. :feelsgood:
  1. Lerna doesn't run prepublish on linked packages (I'll file a PR for that later)
  1. Lerna doesn't include relative dependencies in its internal graph (I've got a local fix for that, but...)
  1. Transitive_ dependencies of relative dependencies are installed _from the npm registry.
So... react-server-cli depends on babel-preset-react-server, which it gets from npm.
So, okay. Chicken/egg.
Unfortunately, in the public npm registry, babel-plugin-react-server has a bad dep on react-server-module-tagger.
Bo Borgerson
@gigabo
Jun 23 2016 21:09
$ npm show babel-plugin-react-server | grep react-server-module-tagger
  dependencies: { 'react-server-module-tagger': '^0.3.0' },
$ npm show react-server-module-tagger | grep version:
  version: '0.0.1',
Man, I really don't like gitter.
Oh, also babel-plugin-react-server needs a devDependency on babel-cli.
Douglas Wade
@doug-wade
Jun 23 2016 21:18
Lerna doesn't run prepublish on linked packages
I don’t think that should matter? Its just a static js file
It is annoying
Lerna doesn't include relative dependencies in its internal graph
Bo Borgerson
@gigabo
Jun 23 2016 21:20
^^ babel-plugin-react-server has a build.
Douglas Wade
@doug-wade
Jun 23 2016 21:21
I see
The relative dependency that’s at issue here is the depedency on react-server-cli from react-server-test-pages?

in the public npm registry, babel-plugin-react-server has a bad dep on react-server-module-tagger

:sheep:

I got a bunch of errors locally while working on this branch because npm requires packages to exist before it performs certain operations
So I published a broken version so I could work on it locally
:disappointed:
Douglas Wade
@doug-wade
Jun 23 2016 21:33
Sounds like the best solution is to wait for our pre-req prs to land and to publish those, then pick this back up?