Open msokk opened 8 years ago
Hi there. Was this submitted by mistake? What is this issue for?
Sorry, I posted the issue description now, I managed to somehow ctrl+enter submit it emptily.
I think we have this same issue—we're using npm link
with private repos (via Lerna) and getting the Cannot automatically buffer without a document
despite (I believe) doing server-side rendering like the examples show.
+1, same issue here using npm link
and importing a custom component library to a server-rendered app
Hi,
I hit into one little snag when setting it up. We have split our app into private npm packages and in development we are running everything with symlinks (
npm link
).Given that this package uses module scope (https://github.com/Khan/aphrodite/blob/master/src/inject.js#L105), it's not possible to have multiple dependency declarations of this package as the module variables are cached separately. For example if there is a generic server package and a project package, with both declaring
aphrodite
inpackage.json
theinject.js
modules will differ, running intoCannot automatically buffer without a document
flow and causing the server to crash. In production the dependency tree is deduped and there is one instance of theaphrodite
package.One possible option would be to break variables out of module scope into
global/window
. I wonder if fixing this would be in the scope of the project? We have a workaround of importing aphrodite through common utility package to prevent duplicates.