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

running npm run docs get error #14288

Closed
aladdin-add opened this issue Apr 2, 2021 · 4 comments · Fixed by #14971
Closed

running npm run docs get error #14288

aladdin-add opened this issue Apr 2, 2021 · 4 comments · Fixed by #14971
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly build This change relates to ESLint's build process repro:yes
Projects

Comments

@aladdin-add
Copy link
Member

Tell us about your environment

Node version: v15.12.0
npm version: v7.7.6
Local ESLint version: v7.23.0 (Currently used)
Global ESLint version: Not found
Operating System: darwin 20.4.0

➜  eslint git:(master) npm run docs

> eslint@7.23.0 docs
> node Makefile.js docs

Generating documentation
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 32 with tag title "typedef" and text "{import("./eslint/eslint").ESLintOptions} ESLintOptions": Invalid type expression "import("./eslint/eslint").ESLintOptions": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 33 with tag title "typedef" and text "{import("./eslint/eslint").LintMessage} LintMessage": Invalid type expression "import("./eslint/eslint").LintMessage": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 34 with tag title "typedef" and text "{import("./eslint/eslint").LintResult} LintResult": Invalid type expression "import("./eslint/eslint").LintResult": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 35 with tag title "typedef" and text "{import("./options").ParsedCLIOptions} ParsedCLIOptions": Invalid type expression "import("./options").ParsedCLIOptions": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 41 with tag title "typedef" and text "{import("./options").ParsedCLIOptions} ParsedCLIOptions": Invalid type expression "import("./options").ParsedCLIOptions": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 127 with tag title "returns" and text "{{errorCount:number;warningCount:number}} The number of error messages.": Invalid type expression "{errorCount:number;warningCount:number}": Expected "#", "$", "(", ",", "-", ".", "/", "0", ":", "<", "=", "@", "[]", "\\", "_", "}", "~", "", "", Unicode combining mark, Unicode decimal number, Unicode letter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode punctuation connector, Unicode titlecase letter, Unicode uppercase letter, or [1-9] but ";" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 132 with tag title "returns" and text "{{errorCount:number;warningCount:number}} The number of error messages.": Invalid type expression "{errorCount:number;warningCount:number}": Expected "#", "$", "(", ",", "-", ".", "/", "0", ":", "<", "=", "@", "[]", "\\", "_", "}", "~", "‌", "‍", Unicode combining mark, Unicode decimal number, Unicode letter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode punctuation connector, Unicode titlecase letter, Unicode uppercase letter, or [1-9] but ";" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/options.js in line 18 with tag title "property" and text "{("problem" | "suggestion" | "layout")[]} [fixType] Specify the types of fixes to apply (problem, suggestion, layout)": Invalid type expression "("problem" | "suggestion" | "layout")[]": Expected "!", "=", "?", or end of input but "[" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/options.js in line 66 with tag title "property" and text "{("problem" | "suggestion" | "layout")[]} [fixType] Specify the types of fixes to apply (problem, suggestion, layout)": Invalid type expression "("problem" | "suggestion" | "layout")[]": Expected "!", "=", "?", or end of input but "[" found.
/Users/weiran/repo/github/eslint/node_modules/shelljs/src/common.js:401
      if (config.fatal) throw e;
                        ^

Error: exec: ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 32 with tag title "typedef" and text "{import("./eslint/eslint").ESLintOptions} ESLintOptions": Invalid type expression "import("./eslint/eslint").ESLintOptions": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 33 with tag title "typedef" and text "{import("./eslint/eslint").LintMessage} LintMessage": Invalid type expression "import("./eslint/eslint").LintMessage": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 34 with tag title "typedef" and text "{import("./eslint/eslint").LintResult} LintResult": Invalid type expression "import("./eslint/eslint").LintResult": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 35 with tag title "typedef" and text "{import("./options").ParsedCLIOptions} ParsedCLIOptions": Invalid type expression "import("./options").ParsedCLIOptions": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 41 with tag title "typedef" and text "{import("./options").ParsedCLIOptions} ParsedCLIOptions": Invalid type expression "import("./options").ParsedCLIOptions": Expected "!", "=", "?", "[]", "|", or end of input but "(" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 127 with tag title "returns" and text "{{errorCount:number;warningCount:number}} The number of error messages.": Invalid type expression "{errorCount:number;warningCount:number}": Expected "#", "$", "(", ",", "-", ".", "/", "0", ":", "<", "=", "@", "[]", "//", "_", "}", "~", "‌", "‍", Unicode combining mark, Unicode decimal number, Unicode letter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode punctuation connector, Unicode titlecase letter, Unicode uppercase letter, or [1-9] but ";" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/cli.js in line 132 with tag title "returns" and text "{{errorCount:number;warningCount:number}} The number of error messages.": Invalid type expression "{errorCount:number;warningCount:number}": Expected "#", "$", "(", ",", "-", ".", "/", "0", ":", "<", "=", "@", "[]", "//", "_", "}", "~", "", "", Unicode combining mark, Unicode decimal number, Unicode letter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode punctuation connector, Unicode titlecase letter, Unicode uppercase letter, or [1-9] but ";" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/options.js in line 18 with tag title "property" and text "{("problem" | "suggestion" | "layout")[]} [fixType] Specify the types of fixes to apply (problem, suggestion, layout)": Invalid type expression "("problem" | "suggestion" | "layout")[]": Expected "!", "=", "?", or end of input but "[" found.
ERROR: Unable to parse a tag's type expression for source file /Users/weiran/repo/github/eslint/lib/options.js in line 66 with tag title "property" and text "{("problem" | "suggestion" | "layout")[]} [fixType] Specify the types of fixes to apply (problem, suggestion, layout)": Invalid type expression "("problem" | "suggestion" | "layout")[]": Expected "!", "=", "?", or end of input but "[" found.

    at Object.error (/Users/weiran/repo/github/eslint/node_modules/shelljs/src/common.js:110:27)
    at execSync (/Users/weiran/repo/github/eslint/node_modules/shelljs/src/exec.js:102:12)
    at _exec (/Users/weiran/repo/github/eslint/node_modules/shelljs/src/exec.js:205:12)
    at /Users/weiran/repo/github/eslint/node_modules/shelljs/src/common.js:335:23
    at Function.target.docs (/Users/weiran/repo/github/eslint/Makefile.js:585:5)
    at Object.global.target.<computed> [as docs] (/Users/weiran/repo/github/eslint/node_modules/shelljs/make.js:36:40)
    at /Users/weiran/repo/github/eslint/node_modules/shelljs/make.js:48:27
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (/Users/weiran/repo/github/eslint/node_modules/shelljs/make.js:46:10)
    at listOnTimeout (node:internal/timers:557:17)

seems it has not run in CI. is it still needed?

@aladdin-add aladdin-add added bug ESLint is working incorrectly build This change relates to ESLint's build process repro:yes labels Apr 2, 2021
@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Apr 2, 2021
@nzakas
Copy link
Member

nzakas commented Apr 7, 2021

I’m not actually sure the last time this command worked. We should decide if we should fix it or just remove it.

@nzakas nzakas moved this from Needs Triage to Evaluating in Triage Apr 7, 2021
@wafuwafu13
Copy link
Contributor

wafuwafu13 commented Aug 22, 2021

@nzakas
Hi :)
I check that get the same error running npm run docs.

And running npm run gensite also get error.

Node version: v16.7.0
npm version: v7.20.3
Local ESLint version: v8.0.0-beta.0 (Currently used)
Global ESLint version: Not found
Operating System:

$ sw_vers
ProductName:    macOS
ProductVersion: 11.4
~/desktop/eslint
$ npm run gensite

> eslint@8.0.0-beta.0 gensite
> node Makefile.js gensite

Generating eslint.org
> Creating a temporary directory (Step 1)
> Removing old files (Step 2)
> Copying the docs folder (Step 3)
> Updating files (Steps 4-9)
> Copying the temporary directory into the site's docs folder (Step 10)
/Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/src/common.js:401
      if (config.fatal) throw e;
                        ^

Error: cp: dest is not a directory (too many sources)
    at Object.error (/Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/src/common.js:110:27)
    at _cp (/Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/src/cp.js:235:12)
    at /Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/src/common.js:384:25
    at Function.target.gensite (/Users/tagawahirotaka/Desktop/eslint/Makefile.js:761:5)
    at Object.global.target.<computed> [as gensite] (/Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/make.js:36:40)
    at /Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/make.js:48:27
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (/Users/tagawahirotaka/Desktop/eslint/node_modules/shelljs/make.js:46:10)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)

npm run gensite has also not run in CI.
Can I delete the npm run docs and npm run gensite commands?

@mdjermanovic
Copy link
Member

gensite is used in our release process to update the content on eslint.org, so we shouldn't delete it.

It works well, but it expects that there's ../website/ directory with a clone of eslint/website.

@nzakas
Copy link
Member

nzakas commented Aug 24, 2021

We can remove the docs script but gensite needs to stay. As @mdjermanovic pointed out, gensite is part of the release process and not intended to be used outside of that.

snitin315 added a commit that referenced this issue Aug 24, 2021
Triage automation moved this from Evaluating to Complete Aug 25, 2021
nzakas pushed a commit that referenced this issue Aug 25, 2021
* Chore: remove `docs` script (fixes #14288)

* Chore: remove `docs` script

* Docs: remove `npm run docs` reference
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Feb 22, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly build This change relates to ESLint's build process repro:yes
Projects
Archived in project
Triage
Complete
Development

Successfully merging a pull request may close this issue.

4 participants