-
Notifications
You must be signed in to change notification settings - Fork 107
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
Strange parseTree from 'jsonc-parser' error ('jsonc-parser' is a CommonJS module, which may not support all module.exports as named exports.) #1111
Comments
i am encountering this issue too. It seems to be related to a resent update of the jsonc-parser package, specifically this commit where an export section was added to the package.json: microsoft/node-jsonc-parser@4f3cf98 |
Excellent! Happy to hear I'm not alone. |
@Zer0xxxx you can workaround this issue by locking |
Yep! "resolutions": {
"jsonc-parser": "3.2.1"
}, |
for any pnpm user, it works by putting the following section into your package.json:
|
Lmao, this is also what is intended to work with Bun, but since I'm globally installing wireit in my Docker container, it seems like I'm doomed. Gonna investigate. |
Installed wireit as a dependency in my package.json (and NOT as a dev dependency since I'm using Looking forward to see it properly patched. |
Heya @rschaufler Also, even if it wasn't totally from the Wireit side, maybe wireit should be more strict on its dependencies? |
Locking in deps to specific versions has pros and cons. We miss bug fixes, and a using package can lose out on opportunities to deduplicate common deps. The strategy of installing wireit in each monorepo or package root that uses wireit and using a lockfile would have prevented this breakage, and is a good practice overall IMO. |
@rictic i am working in a Monorepo with a lockfile. It however doesn't prevent the breakage because the dependency will be updated if you run a update on your packages to apply patch and minor updates. So in essence, the core issue here is that the recent minor update of node-jsonrc-parser was not backwards compatible as a minor update should be. However, the issue is now fixed thanks to @Zer0xxxx issue report at node-jsonc-parser. |
Yeah. Indeed, it broke when I rebuilt from zero my container. I understand your points of view, and I'm also happy that everything came back to normal so fast. Thank you everyone. Maybe we can close this issue, then? |
Yep, closing as fixed. Thanks for filing this upstream! |
When I start my Docker container, I get this error:
I've only noticed it today, it worked properly some days ago.
I'm using:
wireit is globally installed with my Dockerfile, using:
bun i -g wireit
(Also tried
bun i -g [email protected]
, didn't change the result.)The text was updated successfully, but these errors were encountered: