-
Notifications
You must be signed in to change notification settings - Fork 415
Closed
Labels
bug report 🦗Issue is probably a bug, but it needs to be checkedIssue is probably a bug, but it needs to be checkedbundler: webpack 📦Issue is related to webpack bundlerIssue is related to webpack bundlerneeds: complete repro 🖥️Issue need to have complete repro providedIssue need to have complete repro provided
Description
Environment
- Linaria version:
"@linaria/babel-preset": "^4.3.0",
"@linaria/core": "^4.2.2",
"@linaria/react": "^4.3.0",
"@linaria/webpack-loader": "^4.1.8",
- Bundler (+ version): "webpack": "^5.74.0"
- Node.js version: node 16.15.0
- OS: m1 mac OS 13.0.1
Description
I get an error on compile a file. Not sure how this happens because it is pointing to a file with no any CSS (in fact I'm just installing and I not have any linaria code anywhere)
ERROR in ./src/legacy/views/car/monthly_calendar_day_popup.js
Module build failed (from ../node_modules/@linaria/webpack-loader/lib/index.js):
TypeError: /Users/xxx/getaround/getaround-web/www/src/legacy/views/car/monthly_calendar_day_popup.js: Cannot read properties of undefined (reading 'localeCompare')
This error refer to this line of code
https://github.com/callstack/linaria/blob/master/packages/utils/src/scopeHelpers.ts#L395
where the node exist but does not have name
a.node?.name.localeCompare(b.node?.name)
this is what the node have:
{
type: 'StringLiteral',
value: '',
trailingComments: [],
leadingComments: [],
innerComments: []
}
Reproducible Demo
not sure how to reproduce it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug report 🦗Issue is probably a bug, but it needs to be checkedIssue is probably a bug, but it needs to be checkedbundler: webpack 📦Issue is related to webpack bundlerIssue is related to webpack bundlerneeds: complete repro 🖥️Issue need to have complete repro providedIssue need to have complete repro provided