I'm experiencing an issue with make-synchronized in my project. It's being indirectly loaded as a dependency of @prettier/sync, which is a dependency of prettier-plugin-svelte.
Here are the relevant parts of my package.json:
"jest": "29.7.0",
"prettier-plugin-svelte": "2.6.0",
"typescript": "4.5.5",
When I run my project, I encounter the following error:
/mnt/c/work/crchub-freon/Freon4dsl/node_modules/make-synchronized/index.cjs:84
if (typeof module2?.url === "string" && module2.url.startsWith("file://")) {
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/mnt/c/work/crchub-freon/Freon4dsl/node_modules/@prettier/sync/index.cjs:3:36)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
I've tried updating all packages with npm update, but the issue persists. I'm using Node.js version 18.20.3.
All the errors appear to make it appear that I have node.js earlier than v14, such a chaining and # to indicate a private variable or function.
I am running in VSCode IDE on Windows.
Any help would be greatly appreciated.
Thank you.
Hello,
I'm experiencing an issue with
make-synchronized
in my project. It's being indirectly loaded as a dependency of@prettier/sync
, which is a dependency ofprettier-plugin-svelte
.Here are the relevant parts of my
package.json
: