hangxingliu / vscode-coding-tracker

:clock10: A coding activities tracker(time, file, type)
GNU General Public License v3.0
171 stars 34 forks source link

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode #16

Closed neolectron closed 7 years ago

neolectron commented 7 years ago

as said in the title, I have this error when my editor starts up.

[Error]: /home/user/.vscode/extensions/hangxingliu.vscode-coding-tracker-0.4.2/node_modules/vscode-coding-tracker-server/lib/Storage.js:1
(function (exports, require, module, __filename, __dirname) { let Path = require('path'),
                                                              ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:413:25)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/user/.vscode/extensions/hangxingliu.vscode-coding-tracker-0.4.2/node_modules/vscode-coding-tracker-server/app.js:69:12)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
hangxingliu commented 7 years ago

Got it. I will fix it in next version. Now, You can upgrade your Node version to fix it temporary

hangxingliu commented 7 years ago

"use strict" will be add into server-side codes in 0.5.0