Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window is not defined #218

Closed
mehdy opened this issue Nov 20, 2016 · 2 comments
Closed

window is not defined #218

mehdy opened this issue Nov 20, 2016 · 2 comments

Comments

@mehdy
Copy link

mehdy commented Nov 20, 2016

Bug Report

  • Package version(s): 1.0.1

Describe the issue:

as I'm trying to use blueprintjs very basically I get this error while running it:

/path/to/node_modules/dom4/build/dom4.max.js:760
}(window));(function (global){'use strict';
  ^

ReferenceError: window is not defined
    at Object.<anonymous> (/path/to/node_modules/dom4/build/dom4.max.js:760:3)
    at Module._compile (module.js:573:32)
    at Module._extensions..js (module.js:582:10)
    at Object.require.extensions.(anonymous function) [as .js] (/path/to/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Module._load (module.js:441:3)
    at Function.module._load (/path/to/node_modules/piping/lib/piping.js:218:16)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)

how I used it:

import {
      Menu,
      MenuItem,
} from '@blueprintjs/core';

export default class App extends Component {
  render() {
    return (
      <Menu>
        <MenuItem text="New" />
      </Menu>
    );
  }
}

and I use this boilerplate for my project.

Actual behavior:

Expected behavior:

works properly :)

@giladgray
Copy link
Contributor

i'll bet you're trying to render on the server, an environment that does not provide the browser global window. Blueprint does not currently work OOTB in server-side rendering. Please follow #131 for the ongoing conversation.

@mehdy
Copy link
Author

mehdy commented Nov 20, 2016

thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants