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

Static export failed when upgraded to v8.0.0 #6251

Closed
YuriGor opened this issue Feb 11, 2019 · 3 comments
Closed

Static export failed when upgraded to v8.0.0 #6251

YuriGor opened this issue Feb 11, 2019 · 3 comments
Assignees

Comments

@YuriGor
Copy link

YuriGor commented Feb 11, 2019

8.0.0(npm) Bug report

Describe the bug

next app stopped to work on client side after upgrading next to v8.0.0
Coming back to v7.0.3 makes things work.

Here is a broken version with 8.0.0
Here is a working version with 7.0.3

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. this is fixed commit
    it works well by npm run dev
  2. do npm i next@8.0.0 and run an app
  3. menu button and smooth scrolling after side bar clicks do not work.
  4. In browser console you will see Uncaught TypeError: Cannot read property 'textContent' of null

Expected behavior

No errors in console, all the buttons work, scrolling is smooth

Screenshots

Full error:

Uncaught TypeError: Cannot read property 'textContent' of null
    at Object../node_modules/next/dist/client/index.js (index.js:66)
    at __webpack_require__ (bootstrap:788)
    at fn (bootstrap:149)
    at Object../node_modules/next/dist/client/next-dev.js (next-dev.js:23)
    at __webpack_require__ (bootstrap:788)
    at fn (bootstrap:149)
    at Object.0 (module.js:22)
    at __webpack_require__ (bootstrap:788)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)

System information

  • OS: Kubuntu 18.04
  • Browser: chromium
  • Version of Next.js: 8.0.0 from npm

Additional context

CLI command
now init creates nextjs-static example with optimistic package.json:

{
  "scripts": {
    "now-build": "next build && next export -o dist"
  },
  "dependencies": {
    "next": "latest",
    "react": "latest",
    "react-dom": "latest"
  }
}

so it was surprise for me to become a tester of pre-release

@dav-is
Copy link
Contributor

dav-is commented Feb 11, 2019

The issue is @engineerapart/nextscript doesn't support Next 8
https://github.com/engineerapart/nextscript

@YuriGor
Copy link
Author

YuriGor commented Feb 12, 2019

@dav-is Thank you for reply.
Could you please recommend some 'official' way to include some polyfill into nextjs app?
In my case it's static app and I need closest selector.
That solution was fine for next 7, but now I see no signs of life in the project, so chances are low v8 will be supported in the nearest future..
May be I missed some docs about topic?

@timneutkens
Copy link
Member

This should do 🤔 https://github.com/zeit/next.js/tree/canary/examples/with-polyfills

@lock lock bot locked as resolved and limited conversation to collaborators Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants