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

SyntaxError: Unexpected token '.' #219

Open
JimA-cyborg opened this issue Jun 27, 2022 · 3 comments
Open

SyntaxError: Unexpected token '.' #219

JimA-cyborg opened this issue Jun 27, 2022 · 3 comments

Comments

@JimA-cyborg
Copy link

Whenever I try to run the command "jsdoc -c jsdoc.json" in my terminal I receive the following error:

...node_nodules\better-docs\typescript\type-converter.js:45
let name = node.name?.escapedText
^

SyntaxError: Unexpected token '.'
at new Script (vm.js:88:7)
at createScript (vm.js:261:10)
at Object.runInThisContext (vm.js:309:10)
at wrapSafe (internal/modules/cjs/loader.js:902:15)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Object.load (C:\Users\JimArmbruster\source\repos\cyborg-cloud-web\node_modules\requizzle\lib\loader.js:105:18)
at Requizzle.requizzle (C:\Users\JimArmbruster\source\repos\cyborg-cloud-web\node_modules\requizzle\lib\requizzle.js:87:31)
at infectProxy (C:\Users\JimArmbruster\source\repos\cyborg-cloud-web\node_modules\requizzle\lib\loader.js:79:31)
at Module.targetModule.require (C:\Users\JimArmbruster\source\repos\cyborg-cloud-web\node_modules\requizzle\lib\loader.js:97:44)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (C:\Users\JimArmbruster\source\repos\cyborg-cloud-web\node_modules\better-docs\typescript.js:4:23)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)

My jsdoc.json file looks like this:

{ "opts": { "template": "./node_modules/better-docs" }, "tags": { "allowUnknownTags": true }, "plugins": [ "./node_modules/better-docs/typescript", "./node_modules/better-docs/component", "./node_modules/better-docs/typedef-import", "plugins/markdown" ], "source": { "includePattern": "\\.(jsx|js|ts|tsx)$", "include": ["./src"], "exclude": ["./docs", "./node_modules"], "excludePattern": "(node_modules/|docs)" } }

I'm using:

jsdoc: ^3.6.7,
better-docs: ^2.7.2,
react: ^17.0.2,
typescript: ^4.6.3

I'm also using v12.20.0 of node.

@rangerch
Copy link

same error.

different is,
typescript: ^4.7.4
node: 12.21.0

@rangerch
Copy link

update node version to 16 can solve this problem!

@JimA-cyborg
Copy link
Author

JimA-cyborg commented Jul 14, 2022 via email

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

No branches or pull requests

2 participants