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
Importing this plugin into a Nuxt project and building with npm run start (nuxt generate and nuxt start) is not possible.
Reproduction
Creating a page in Nuxt with the following code:
<template>
<h1>Hi</h1>
</template>
<script>
import parserJava from "prettier-plugin-java";
</script>
And building, navigating to page, results in an error of: TypeError: Cannot read property '1' of null at vn (a7816b4.js:2) at e.exports.e.initRecognizerEngine (a7816b4.js:2) at new e (a7816b4.js:2) at new e.exports (a7816b4.js:2) at Object.<anonymous> (a7816b4.js:2) at l (094da21.js:1) at Object.<anonymous> (a7816b4.js:2) at l (094da21.js:1) at Object.<anonymous> (a7816b4.js:2) at l (094da21.js:1)
nuxt-static-error.zip
Run npm i followed by npm run start in this project to see the issue. If you run npm run dev it works.
The text was updated successfully, but these errors were encountered:
Apparently - "This is not a Nuxt-specific issue. The error is being thrown by chevrotain, a dependency of prettier-plugin-java. It is inspecting the source code of a class with a RegExp to try to find a function name - which, because it's built, is different from development mode."
Description
Importing this plugin into a Nuxt project and building with
npm run start (nuxt generate and nuxt start)
is not possible.Reproduction
Creating a page in Nuxt with the following code:
And building, navigating to page, results in an error of:
TypeError: Cannot read property '1' of null at vn (a7816b4.js:2) at e.exports.e.initRecognizerEngine (a7816b4.js:2) at new e (a7816b4.js:2) at new e.exports (a7816b4.js:2) at Object.<anonymous> (a7816b4.js:2) at l (094da21.js:1) at Object.<anonymous> (a7816b4.js:2) at l (094da21.js:1) at Object.<anonymous> (a7816b4.js:2) at l (094da21.js:1)
nuxt-static-error.zip
Run
npm i
followed bynpm run start
in this project to see the issue. If you runnpm run dev
it works.The text was updated successfully, but these errors were encountered: