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

[URGENT] Vite 5.0.10 upgrade not working with Macaron #50

Open
dugip opened this issue Dec 18, 2023 · 4 comments
Open

[URGENT] Vite 5.0.10 upgrade not working with Macaron #50

dugip opened this issue Dec 18, 2023 · 4 comments

Comments

@dugip
Copy link
Contributor

dugip commented Dec 18, 2023

Macaron needs an update so that it can continue to work with the newest versions of Vite 5.x.

The error I'm getting is this:

vite v5.0.10 building for development...
✓ 170 modules transformed.
[vite:react-babel] /Users/web/g/platform-clone/frontend-packages/design-system/src/web/extracted_1fmahrf.css.ts: Identifier 'globalStyle' has already been declared. (26:9)

  24 | });
  25 | var _$macaron$$unknown6 = _$macaron$$unknown5;
> 26 | import { globalStyle, globalFontFace } from '@macaron-css/core';
     |          ^
  27 | export var _$macaron$$unknown7 = globalStyle('*, ::before, ::after', {
  28 |   boxSizing: 'border-box'
  29 | });
file: /Users/web/g/platform-clone/frontend-packages/design-system/src/web/extracted_1fmahrf.css.ts:26:9
error during build:
SyntaxError: /Users/web/g/platform-clone/frontend-packages/design-system/src/web/extracted_1fmahrf.css.ts: Identifier 'globalStyle' has already been declared. (26:9)

  24 | });
  25 | var _$macaron$$unknown6 = _$macaron$$unknown5;
> 26 | import { globalStyle, globalFontFace } from '@macaron-css/core';
     |          ^
  27 | export var _$macaron$$unknown7 = globalStyle('*, ::before, ::after', {
  28 |   boxSizing: 'border-box'
  29 | });
    at constructor (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:356:19)
    at TypeScriptParserMixin.raise (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:3223:19)
    at TypeScriptScopeHandler.declareName (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:7038:21)
    at TypeScriptParserMixin.declareNameFromIdentifier (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:7484:16)
    at TypeScriptParserMixin.checkIdentifier (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:7480:12)
    at TypeScriptParserMixin.checkLVal (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:7419:12)
    at TypeScriptParserMixin.finishImportSpecifier (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14175:10)
    at TypeScriptParserMixin.parseImportSpecifier (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14352:17)
    at TypeScriptParserMixin.parseImportSpecifier (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:10004:18)
    at TypeScriptParserMixin.parseNamedImportSpecifiers (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14330:36)
    at TypeScriptParserMixin.parseImportSpecifiersAndAfter (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14152:37)
    at TypeScriptParserMixin.parseImport (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14145:17)
    at TypeScriptParserMixin.parseImport (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:9251:26)
    at TypeScriptParserMixin.parseStatementContent (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:12710:27)
    at TypeScriptParserMixin.parseStatementContent (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:9340:18)
    at TypeScriptParserMixin.parseStatementLike (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:12588:17)
    at TypeScriptParserMixin.parseModuleItem (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:12565:17)
    at TypeScriptParserMixin.parseBlockOrModuleBlockBody (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:13189:36)
    at TypeScriptParserMixin.parseBlockBody (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:13182:10)
    at TypeScriptParserMixin.parseProgram (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:12464:10)
    at TypeScriptParserMixin.parseTopLevel (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:12454:25)
    at TypeScriptParserMixin.parse (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14376:10)
    at TypeScriptParserMixin.parse (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:9982:18)
    at parse (/Users/web/g/platform-clone/node_modules/@babel/parser/lib/index.js:14417:38)
    at parser (/Users/web/g/platform-clone/node_modules/@babel/core/lib/parser/index.js:41:34)
    at parser.next (<anonymous>)
    at normalizeFile (/Users/web/g/platform-clone/node_modules/@babel/core/lib/transformation/normalize-file.js:64:37)
    at normalizeFile.next (<anonymous>)
    at run (/Users/web/g/platform-clone/node_modules/@babel/core/lib/transformation/index.js:21:50)
    at run.next (<anonymous>)
    at transform (/Users/web/g/platform-clone/node_modules/@babel/core/lib/transform.js:22:33)
    at transform.next (<anonymous>)
    at step (/Users/web/g/platform-clone/node_modules/gensync/index.js:261:32)
    at /Users/web/g/platform-clone/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/Users/web/g/platform-clone/node_modules/gensync/index.js:223:11)
platform-clone/webapp 1 %

It would be greatly appreciated if an update came in sooner than later.

@dugip dugip changed the title Vite 5.0.10 upgrade not working with Macaron [URGENT] Vite 5.0.10 upgrade not working with Macaron Dec 18, 2023
@Mokshit06
Copy link
Member

Thanks for reporting this, and apologies for the delayed response.
On first glance, I'm not sure this has to do vite 5.x. Did this work fine for you with earlier versions? It would also be great if you could create a reproduction of this issue 🙂

@dhutaryan
Copy link

dhutaryan commented Mar 8, 2024

I have the same error for createVar and style with vite 5.0.0

@Mokshit06
Copy link
Member

Going to look into this.

@dhutaryan
Copy link

That's interesting. I used to @compiled/react and macaron at the same time and got this error. Then I have removed @compiled/react and it seems. the error threw away.

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

3 participants