You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prettier module published on NPM is a popular code formatter (~29 million downloads a week. It is necessary for us to migrate to deno away from NodeJS without breaking our workflow. Currently, deno fails on pretter use even with trivial code.
Repro steps
Contents of repro.ts:
importprettierfrom'prettier';// The code being formatted is just empty string// The filename is there just to indicate it is JS as opposed to HTML or CSS or TSX or something elseprettier.format('',{filename: '1.js'});
Output of deno run --unstable --import-map=repro.json --allow-read --allow-env repro.ts:
user@pc:~/deno-repro$ deno run --unstable --import-map=repro.json --allow-read --allow-env repro.ts
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.
error: Uncaught RangeError: Maximum call stack size exceeded
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
at Object.get (deno:ext/node/01_node.js:35:26)
The text was updated successfully, but these errors were encountered:
Perhaps accessing globalThis.global inside the npm module will enter an infinite loop. I'm not sure, but I debugged with the --inspect flag and it seems to go into an infinite recursion right after executing this line.
prettier
module published on NPM is a popular code formatter (~29 million downloads a week. It is necessary for us to migrate to deno away from NodeJS without breaking our workflow. Currently, deno fails on pretter use even with trivial code.Repro steps
Contents of
repro.ts
:Contents of
repro.json
:Output of
deno run --unstable --import-map=repro.json --allow-read --allow-env repro.ts
:The text was updated successfully, but these errors were encountered: