Skip to content

v1.9.x fails to build or run dev on a default project #2981

Closed
@xvdd

Description

@xvdd
  • I confirm that this is an issue rather than a question.

Bug report

With v1.9, an error with shared-utils env.js prevents to run a default VuePress project.

Steps to reproduce

Create boilerplate VuePress site using the Getting Started guide:

$ yarnpkg create vuepress-site test
$ cd test/docs
$ yarnpkg install
$ yarnpkg dev

What is expected?

Running the dev server on port 8080

What is actually happening?

$ yarnpkg dev
yarn run v1.22.4
$ vuepress dev src
/home/<dir>/test/docs/node_modules/@vuepress/shared-utils/lib/env.js:3
    isDebug;
           ^

SyntaxError: Unexpected token ;
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/<dir>/test/docs/node_modules/@vuepress/shared-utils/lib/index.js:38:31)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
$ npx vuepress info
Unexpected token ;
  • Ubuntu 20.04.3 LTS (Focal Fossa)
  • Node: 10.19.0
  • yarnpkg: 1.22.4
  • npm: 6.14.4
  • vuepress: 1.9.5

Affected Versions

Forcing vuepress to v1.8.2 in package.json runs and builds successfully.

Affected versions tested KO:

  • v1.9.5
  • v1.9.4
  • v1.9.2
  • v1.9.0

Test with npm

npm run dev fails with the same error after npm install on the default project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions