vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

fresh new 1.x project fails to build (but dev works OK)

Open jorismak opened this issue 2 years ago • 0 comments

  • [x] I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

mkdir my-new-project
cd my-new-project
npx create-vuepress-site
npm run dev
npm run build

What is expected?

Successful build when a project is just scaffolded.

What is actually happening?

$ npm run build

> [email protected] build
> vuepress build src

wait Extracting site metadata...
tip Apply theme @vuepress/theme-default ...
warning An error was encountered in plugin "@vuepress/plugin-back-to-top"
warning An error was encountered in plugin "@vuepress/plugin-medium-zoom"
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...

✖ Client
  Compiled with some errors in 7.44s

✔ Server
  Compiled successfully in 5.74s

(undefined) ./node_modules/@vuepress/core/.temp/style.styl
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:795:74)
    at __webpack_require__ (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:21:30)
    at Object.<anonymous> (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:394:1)
    at __webpack_require__ (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:21:30)
    at Object.<anonymous> (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:740:28)
    at __webpack_require__ (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:21:30)
    at /home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:85:18
    at Object.<anonymous> (/home/joris/vhosts/vuepress-test/docs/node_modules/css-loader/dist/cjs.js??ref--13-oneOf-1-1!/home/joris/vhosts/vuepress-test/docs/node_modules/postcss-loader/src/index.js??ref--13-oneOf-1-2!/home/joris/vhosts/vuepress-test/docs/node_modules/stylus-loader/index.js??ref--13-oneOf-1-3!/home/joris/vhosts/vuepress-test/docs/node_modules/@vuepress/core/.temp/style.styl:88:10)

and this goes on for quite a bit, with lots of repeated blocks of errors.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
  System:
    OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900H
  Binaries:
    Node: 14.19.3 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.12.2 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @vuepress/core:  1.9.7 
    @vuepress/theme-default:  1.9.7 
    vuepress: ^1.5.3 => 1.9.7 
  npmGlobalPackages:
    vuepress: Not Found

(from inside the generated docs directory)

The same thing happens when I try it with yarn btw.

Is probably related / the same as #3061

jorismak avatar Jul 05 '22 13:07 jorismak