javascriptnode.jsnode-modulesapi-doc

Error on "apidoc" lib while run on Docker


I am getting error on apidoc (apidoc-0.50.3 version) while run in Docker and I am using Node v12.22.7

Command :

RUN npm install apidoc -g
RUN apidoc -e node_modules

Error :

node_modules/apidoc/lib/writer.js:136
const title = projectInfo.title ?? projectInfo.name ?? 'Loading...';
SyntaxError: Unexpected token '?'

Help me to find out a solution.


Solution

  • I got the answer : https://github.com/apidoc/apidoc/issues/1045 .Needed to upgrade nodejs