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

7.1.4 release is broken for SSR [FIXED IN 7.1.5] #389

Closed
PabloSzx opened this issue Oct 27, 2021 · 7 comments
Closed

7.1.4 release is broken for SSR [FIXED IN 7.1.5] #389

PabloSzx opened this issue Oct 27, 2021 · 7 comments

Comments

@PabloSzx
Copy link

Reference issue on another library: the-guild-org/docs#224

@klapec
Copy link

klapec commented Oct 27, 2021

Same here,

> Build error occurred
ReferenceError: window is not defined
    at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/react-paginate/dist/react-paginate.js:1:254)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.3412 (/opt/atlassian/pipelines/agent/build/.next/server/pages/checkout/reservation/[offerCode]/[pageType].js:7137:49)
    at __webpack_require__ (/opt/atlassian/pipelines/agent/build/.next/server/webpack-runtime.js:25:42)
    at __webpack_exec__ (/opt/atlassian/pipelines/agent/build/.next/server/pages/checkout/reservation/[offerCode]/[pageType].js:9837:39) {
  type: 'ReferenceError'
}

MonsieurV added a commit that referenced this issue Oct 27, 2021
@MonsieurV
Copy link
Collaborator

Hi,

Indeed, I fixed the build for browser... to break it for Node.

I changed the Webpack build to use this as globalObject so we have a build that supports both browser and Node.
See 38e1d2e

Can someone validate this work before @AdeleD publish to NPM?
You can test with:

npm install --save AdeleD/react-paginate#v7.1.5

Thanks for the report

@arnaudlittleguest
Copy link

@MonsieurV I tried it and it works fine on my local project. Thanks to you!

@AdeleD
Copy link
Owner

AdeleD commented Oct 27, 2021

@MonsieurV I'm OK to release the fix but it seems that tests are failing on master.
(Maybe it would be safer you work with PRs instead of pushing your improvements on master directly, don't you think? (I mean, all you do for release 8.0.0 for instance))

@MonsieurV
Copy link
Collaborator

@AdeleD normally I started doing just that with the v8 branch. I'll go more easy on the master.

I fixed the test (we'll wait until v8 to change the control behavior, as this changes the API).

Speaking of tests, I don't see them on Travis. Could you migrate to travis-ci.com? (I don't think I can)

From https://travis-ci.org/github/AdeleD/react-paginate to https://app.travis-ci.com/github/AdeleD/react-paginate

@AdeleD
Copy link
Owner

AdeleD commented Oct 27, 2021

Thanks. v7.1.5 has been released.

Speaking of tests, I don't see them on Travis. Could you migrate to travis-ci.com? (I don't think I can)

From https://travis-ci.org/github/AdeleD/react-paginate to https://app.travis-ci.com/github/AdeleD/react-paginate

I will look at it.

@PabloSzx
Copy link
Author

PabloSzx commented Oct 27, 2021

Confirmed 7.1.5 is fixed for SSR, thanks @AdeleD

and btw, the release in GH says 7.1.15 when it should say 7.1.5

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

5 participants