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

SSR bug #5

Open
prevostc opened this issue Aug 6, 2018 · 1 comment
Open

SSR bug #5

prevostc opened this issue Aug 6, 2018 · 1 comment

Comments

@prevostc
Copy link
Contributor

prevostc commented Aug 6, 2018

I'm using this lib with nextjs and the fact that places.js is imported makes SSR fail with the error:

window is not defined
ReferenceError: window is not defined
    at Object.<anonymous> (/var/www/project/node_modules/autocomplete.js/zepto.js:5:119)
    at Module._compile (module.js:652:30)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .js] (/var/www/project/node_modules/ts-node/src/index.ts:422:14)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/www/project/node_modules/autocomplete.js/src/standalone/index.js:4:13)
    at Module._compile (module.js:652:30)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .js] (/var/www/project/node_modules/ts-node/src/index.ts:422:14)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
@csauvage
Copy link
Owner

csauvage commented Aug 8, 2018

I don't know a lot about nextjs, I'll take a look this week-end.

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