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

Cannot read properties of null (reading 'declarations') #1262

Closed
PierreGUI opened this issue Jun 22, 2023 · 2 comments · Fixed by #1269
Closed

Cannot read properties of null (reading 'declarations') #1262

PierreGUI opened this issue Jun 22, 2023 · 2 comments · Fixed by #1269
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@PierreGUI
Copy link

Environment

  • Linaria version:
    • @linaria/core 4.2.10
    • @linaria/shaker 4.2.11
    • @linaria/react 4.3.8
  • Bundler: webpack 5.75
  • Node.js version: v16.14.2
  • OS: MacOS 13.3.1

Description

When migrating my codebase to the latest Linaria, I encounter this error:

Cannot read properties of null (reading 'declarations')
    at NodePath._getKey (@babel+traverse@7.22.5/node_modules/@babel/traverse/lib/path/family.js)

I was able to narrow it down to one function, which I've included in my repro below. I hope it makes sense to you and that you'll be able to fix it.

Reproducible Demo

https://stackblitz.com/edit/linaria-bug-4yqklk?file=src%2Futils%2Findex.ts

@PierreGUI PierreGUI added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Jun 22, 2023
@github-actions github-actions bot added bundler: webpack 📦 Issue is related to webpack bundler and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Jun 22, 2023
@Anber Anber closed this as completed in 890b4ac Jul 4, 2023
@Anber
Copy link
Collaborator

Anber commented Jul 4, 2023

I am ashamed that it took so long :)

@PierreGUI
Copy link
Author

@Anber thanks a lot! Latest build indeed seems to fix the problem 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants