Hello guys, here i have my project, it works without any issues in development but it fails build.
Unanswered
Kryp Arnold posted this in #help-forum
5 Replies
Failed to compile.
171.js from Terser
x await isn't allowed in non-async function
,-[32803:1]
32803 | /* harmony import */ var unified__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12941);
32804 | /* harmony import */ var rehype_parse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81032);
32805 | var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([shiki__WEBPACK_IMPORTED_MODULE_0__]);
32806 | shiki__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32807 |
32808 |
`----
Caused by:
0: failed to parse input file
1: Syntax Error
Error:
x await isn't allowed in non-async function
,-[32803:1]
32803 | /* harmony import */ var unified__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12941);
32804 | /* harmony import */ var rehype_parse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81032);
32805 | var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([shiki__WEBPACK_IMPORTED_MODULE_0__]);
32806 | shiki__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32807 |
32808 |
`----
Caused by:
0: failed to parse input file
1: Syntax Error
> Build failed because of webpack errorsthe errors i got
Toyger
problem in your
try to move everything that using it in separate file instead
or even better try it on empty project to understand does it work at all, maybe it have some problems with newer version of nextjs
rehypePrettyCode try to move everything that using it in separate file instead
queries.tsxor even better try it on empty project to understand does it work at all, maybe it have some problems with newer version of nextjs
@Toyger problem in your `rehypePrettyCode`
try to move everything that using it in separate file instead `queries.tsx`
or even better try it on empty project to understand does it work at all, maybe it have some problems with newer version of nextjs
after 3-4 hours of trying other markdown compiling methods, i fixed it: https://github.com/kryparnold/kryp-dev/commit/0a3acfa9ca6110e29fe45b030a39d393dfa69e4e