Cannot require() ES Module /media/hdd/local/project/php/l11-sim/node_modules/prettier/standalone.mjs in a cycle. (from /media/hdd/local/project/php/l11-sim/node_modules/@prettier/plugin-php/standalone.js)
whats wrong?
How to reproduce?
Ah, sorry. I thought this is the Prettier core repo, anyway I'll take a look. Would you mind take a look what version of Prettier are you using? Since it's possible caused by a recent change in Prettier core https://github.com/prettier/prettier/pull/16958, released in v3.5
Maybe also related https://github.com/nodejs/node/issues/52145
@fisker ah sorry, i use prettier 3.5.1. whats wrong?
I'll take a look.
error occurs when i install prettier using plugin @shufo/prettier-plugin-blade
@utqinadhif What version of Node.js are you using?
I tried this script,
const prettier = require('prettier/standalone')
const prettierPluginPhp = require('@prettier/plugin-php/standalone')
;(async () => {
const x = await prettier.format('<?php $a= 1', {
parser:'php',
plugins: [prettierPluginPhp]
})
console.log(x)
})();
it successfuly prints <?php $a = 1;