blogster icon indicating copy to clipboard operation
blogster copied to clipboard

require is not defined

Open hut36 opened this issue 2 years ago • 4 comments

How to reproduce:

  1. run npx create-blogster@latest --theme sleek
  2. run cd my-blogster-blog
  3. run yarn run dev --host
  4. visit http://127.0.0.1:3000/blog/basic-markdown-style-guide

The page displays an error message:

require is not defined

/my-blogster-blog/.yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip/node_modules/prismjs/components/index.js:1:33

> 1 | const components = require('../components.js');
    |                                 ^
  2 | const getLoader = require('../dependencies');

ReferenceError: require is not defined
    at /.yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip/node_modules/prismjs/components/index.js:1:33
    at instantiateModule (file:///my-blogster-blog/.yarn/__virtual__/vite-virtual-2b0880e296/0/cache/vite-npm-3.2.5-f23b9ecb5b-ad35b7008c.zip/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:53364:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5

Other information:

  • platform: MacOS
  • yarn 3.3.0
  • node 18.12.1

hut36 avatar Jan 16 '23 04:01 hut36