Closed svn-josh closed 2 years ago
finkfw@FF-Auto-Linux:~/Crontab-UI$ crontab-ui /usr/local/lib/node_modules/crontab-ui/crontab.js:27 var humanCronLocate = process.env.HUMANCRON ?? "en" ^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
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 Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.
Which node version are you using? (Run npm --version and node --version)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
i had the same issue and it turns out that it was the node version that caused this. so basically my user uses node v 19 but all the scripts that are running by the corn use v12.22.9
Hey @aymen3009, I am not a node user. Could you share how did you make the user run v12.22.9?
I am getting the above error as well. My details: node --version is v12.22.9 npm --version is 8.5.1
i just did nano - c /usr/local/lib/node_modules/crontab-ui/crontab.js
on line 27: i removed ?? "en" and the file looks like this.
`
and the ui is working for me.
Make sure these boxes are checked( - [x] ) before submitting an issue.
npm --version
andnode --version
). Get the latest nodejs here.node_modules
folder has right permissions (Runls -ld $(npm root -g)/crontab-ui
)finkfw@FF-Auto-Linux:~/Crontab-UI$ crontab-ui /usr/local/lib/node_modules/crontab-ui/crontab.js:27 var humanCronLocate = process.env.HUMANCRON ?? "en" ^ SyntaxError: Unexpected token '?' at wrapSafe (internal/modules/cjs/loader.js:915:16) 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 Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/usr/local/lib/node_modules/crontab-ui/app.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
finkfw@FF-Auto-Linux:~/Crontab-UI$