Software
Next.js 16 build error
Date Published
When receiving the following error during building PayloadCMS in Next.js 16 when including .md files from node_modules:
1Reading source code for parsing failed2An unexpected error happened while trying to read the source code to parse: failed to convert rope into string34Caused by:5- invalid utf-8 sequence of 1 bytes from index 0
it's possible to add this to next.config.ts to ignore the loading of these files:
1turbopack: {2 rules: {3 '*.md': {4 loaders: ['ignore-loader'],5 as: '*.js',6 },7 },8},
