Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
xvdd opened this issue Jan 3, 2022 · 2 comments · Fixed by #2992
Closed
1 task done

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

xvdd opened this issue Jan 3, 2022 · 2 comments · Fixed by #2992

Comments

@xvdd
Copy link

xvdd commented Jan 3, 2022

  • 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.

@patchshorts
Copy link

I have the same issue

1 similar comment
@Nanshouwyq
Copy link

I have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants