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

Unexpected token from documentation readme? #1068

Closed
SumNeuron opened this issue May 14, 2018 · 13 comments
Closed

Unexpected token from documentation readme? #1068

SumNeuron opened this issue May 14, 2018 · 13 comments

Comments

@SumNeuron
Copy link

installed with

npm install -g documentation

with Warn optional skipping failed optional dependency fsevents

Ran:

documentation build src/** -f html -o docs

got

/usr/local/lib/node_modules/documentation/lib/commands/readme.js:63
  const log = (...data) => {
               ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/documentation/lib/commands/index.js:18:11)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
@SumNeuron
Copy link
Author

even documentation --help throws this error

@arv
Copy link
Contributor

arv commented May 14, 2018

Looks like your version of node is too old.

@SumNeuron
Copy link
Author

I'm new to node so I didn't realize. Thanks for the quick help! :D

@SumNeuron
Copy link
Author

Worked once and now I get fs.js1024

fs.js:1024
    throw new ERR_OUT_OF_RANGE('mode', undefined, mode);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "mode" is out of range. Received 33188
    at Object.fs.fchmod (fs.js:1024:11)
    at Object.fchmod (/usr/local/lib/node_modules/documentation/node_modules/graceful-fs/polyfills.js:237:17)
    at mode (/usr/local/lib/node_modules/documentation/node_modules/vinyl-fs/lib/file-operations.js:237:10)
    at onStat (/usr/local/lib/node_modules/documentation/node_modules/vinyl-fs/lib/file-operations.js:227:14)
    at /usr/local/lib/node_modules/documentation/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:150:5)

@SumNeuron
Copy link
Author

copy pasting all files to test.js and running works...

@SumNeuron SumNeuron reopened this May 16, 2018
@tmcw
Copy link
Member

tmcw commented May 16, 2018

Are you running some unusual filesystem or operating system? These errors are deep in heavily-tested, general modules that documentation.js uses internally, it's very unlikely that they're an actual bug in documentation.js.

@SumNeuron
Copy link
Author

@tmcw

It is a relatively clean install of ubuntu 16 LTS.
I have no idea what is going on as i was able to use documentation.js once and it works when combined into a single file

@SumNeuron
Copy link
Author

I am using this in a rollup project, and it bundles so I do not think it is an error with import statments...

@SumNeuron
Copy link
Author

I have tried uninstall and reinstalling node (and updating to latest version), and I still get this error (but I can run documentation if I copy everything to a test file)

@tmcw
Copy link
Member

tmcw commented May 16, 2018

🤔 Okay, this may be a Node v10 thing, according to the related issues. I'll look into it this evening.

@SumNeuron
Copy link
Author

Sorry I can't be more help, but I just started using node when I opened this issue - so I am still very green and don't really know how to debug it.

I am willing to uninstall and reinstall if you give me the commands to run (as there are multiple ways to do this) if it helps with debugging

@SumNeuron
Copy link
Author

If it helps, the repo is:

https://gitlab.com/SumNeuron/d3sm

@tmcw
Copy link
Member

tmcw commented Sep 21, 2018

This was, indeed, a Node v10 bug. Fixed upstream in nodejs/node#20498

@tmcw tmcw closed this as completed Sep 21, 2018
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

3 participants