Plasmic sync error fixing imports `plasmic_css` has already been declared

Hi,

I have an existing plasmic project that is configured as a codegen project, and has previously been syncronising correctly. I have just made a minor change to the design, and now I am getting errors running plasmic sync. An error message Error encountered while fixing imports for Policies: SyntaxError: Identifier 'plasmic_css' has already been declared. is shown. This is causing the sync to fail.

Any ideas how to fix this?

I have tried a plasmic sync --force, but that didn’t make any difference.

Full console log follows:

PS D:\SourceControl\Toia\toia-website> plasmic sync        
Project 'plasmic-basic-components'@3.34.0 is already up to date; skipping. (To force an update, run again with "--force")
Project 'plasmic-rich-components'@16.7.0 is already up to date; skipping. (To force an update, run again with "--force")
Project 'antd5 hostless'@6.20.0 is already up to date; skipping. (To force an update, run again with "--force")
Project 'react-youtube'@4.21.0 is already up to date; skipping. (To force an update, run again with "--force")
Project 'plasmic-nav'@0.26.0 is already up to date; skipping. (To force an update, run again with "--force")
Updating project 'Toia Website' to latest
Syncing component: Homepage@latest      ['Toia Website' 6vuPv6THo987SikY8BTQKW/SKmaqJf6wbmX latest]
Syncing component: Button2@latest       ['Toia Website' 6vuPv6THo987SikY8BTQKW/23mlA6hj-Lm latest]
Syncing component: Policies@latest      ['Toia Website' 6vuPv6THo987SikY8BTQKW/vxzU7g9FM6 latest]
Syncing component: FooterSection@latest ['Toia Website' 6vuPv6THo987SikY8BTQKW/GODaUBDH5aX latest]
Syncing component: HeaderMenuBar@latest ['Toia Website' 6vuPv6THo987SikY8BTQKW/5ubrN3Vmdx6 latest]
Syncing component: Contact@latest       ['Toia Website' 6vuPv6THo987SikY8BTQKW/EyWP-TniDZ_8 latest]
Syncing component: Card@latest  ['Toia Website' 6vuPv6THo987SikY8BTQKW/sWUPbH0QhE1A latest]
Syncing component: Statistic@latest     ['Toia Website' 6vuPv6THo987SikY8BTQKW/pCatCSYUqWbK latest]
Syncing component: CaseStudies@latest   ['Toia Website' 6vuPv6THo987SikY8BTQKW/fTaoz9DaggS- latest]
Syncing component: Company@latest       ['Toia Website' 6vuPv6THo987SikY8BTQKW/tjtansgtAqFT latest]
Syncing component: Services@latest      ['Toia Website' 6vuPv6THo987SikY8BTQKW/a--91HwmsUSg latest]
Syncing component: Capabilities@latest  ['Toia Website' 6vuPv6THo987SikY8BTQKW/k9TFuH8yyMBD latest]
Syncing component: Nuclear@latest       ['Toia Website' 6vuPv6THo987SikY8BTQKW/WU8VYfXum6c0 latest]
Syncing component: CaseStudyMatrix@latest       ['Toia Website' 6vuPv6THo987SikY8BTQKW/kWeZKARTRne1 latest]
Fixing import statements...
Error encountered while fixing imports for Homepage: SyntaxError: Identifier 'plasmic_css' has already been declared. (83:7)
Error encountered while fixing imports for Button2: SyntaxError: Identifier 'plasmic_css' has already been declared. (78:7)
Error encountered while fixing imports for Policies: SyntaxError: Identifier 'plasmic_css' has already been declared. (79:7)
Error encountered while fixing imports for FooterSection: SyntaxError: Identifier 'plasmic_css' has already been declared. (78:7)
Error encountered while fixing imports for HeaderMenuBar: SyntaxError: Identifier 'plasmic_css' has already been declared. (80:7)
Error encountered while fixing imports for Contact: SyntaxError: Identifier 'plasmic_css' has already been declared. (90:7)
Error encountered while fixing imports for Card: SyntaxError: Identifier 'plasmic_css' has already been declared. (78:7)
Error encountered while fixing imports for Statistic: SyntaxError: Identifier 'plasmic_css' has already been declared. (78:7)
Error encountered while fixing imports for CaseStudies: SyntaxError: Identifier 'plasmic_css' has already been declared. (80:7)
Error encountered while fixing imports for Company: SyntaxError: Identifier 'plasmic_css' has already been declared. (79:7)
Error encountered while fixing imports for Services: SyntaxError: Identifier 'plasmic_css' has already been declared. (80:7)
Error encountered while fixing imports for Capabilities: SyntaxError: Identifier 'plasmic_css' has already been declared. (81:7)
Error encountered while fixing imports for Nuclear: SyntaxError: Identifier 'plasmic_css' has already been declared. (78:7)
Error encountered while fixing imports for CaseStudyMatrix: SyntaxError: Identifier 'plasmic_css' has already been declared. (80:7)

Plasmic error: Identifier 'plasmic_css' has already been declared. (80:7)SyntaxError: Identifier 'plasmic_css' has already been declared. (80:7)
    at constructor (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:97481:23)
    at TypeScriptParserMixin.raise (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:100377:23)
    at TypeScriptScopeHandler.checkRedeclarationInScope (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:98633:23)
    at TypeScriptScopeHandler.declareName (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:98603:16)
    at TypeScriptScopeHandler.declareName (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:104246:15)
    at TypeScriptParserMixin.declareNameFromIdentifier (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:104682:20)
    at TypeScriptParserMixin.checkIdentifier (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:104678:16)
    at TypeScriptParserMixin.checkLVal (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:104616:16)
    at TypeScriptParserMixin.finishImportSpecifier (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:111443:14)
    at TypeScriptParserMixin.parseImportSpecifierLocal (C:\Users\TomSmith\AppData\Roaming\npm\node_modules\@plasmicapp\cli\dist\index.js:111440:35)
1 Like

Hello, I have the same problem here.

ok, have made a few more changes in plasmic, and tried another sync, now the issue has cleared. Changes were minor and cosmetic, no idea what caused this or why it cleared up.

1 Like

Should be fixed for now; sorry about that