Closed katanacrimson closed 6 years ago
...Looking at the file referenced, it looks like it's the Array.push()...which doesn't make a whole lot of sense. Possibly the result
array is getting nulled out somehow?
It is very weird. It should not depend on code that you have written. Please, check you version of node. v6.0.0+ is required.
nvm installed version of node, using 8.9.0
currently.
Just noticed that currently, if I run Update Imports, it gives me that error twice (the exact code block above). Not sure what to make of that, but it may be significant.
https://github.com/unlight/sublime-import-helper/blob/master/backend/commands/get_modules.js#L25
This line throws error.
I cant imagine how I can get result as non array here.
I can add stupid check there like Array.isArray(result)
but I would like to catch this bug.
Yes, it is running twice. First run for dependecies
, second for devDependencies
In that case - here's dependencies and devDependencies (since you mentioned it - maybe it's relevant?):
"dependencies": {
"@types/node": "^8.0.54",
"base62.js": "^0.5.0",
"bcrypt": "^1.0.3",
"config": "^1.28.1",
"debug": "^3.1.0",
"fs-extra": "^4.0.2",
"koa": "^2.4.1",
"koa-body": "^2.5.0",
"koa-favicon": "^2.0.0",
"koa-helmet": "^3.3.0",
"koa-router": "^7.3.0",
"koa-session-minimal": "^3.0.4",
"koa-static": "^4.0.2",
"mysql": "^2.15.0",
"mysql2": "^1.5.1",
"reflect-metadata": "^0.1.10",
"sequelize": "^4.26.0",
"sharp": "^0.18.4",
"swagger2": "^0.0.26",
"swagger2-koa": "^0.0.38"
},
"devDependencies": {
"@types/chai": "^4.0.7",
"@types/config": "^0.0.33",
"@types/debug": "^0.0.30",
"@types/fs-extra": "^4.0.5",
"@types/koa": "^2.0.42",
"@types/koa-router": "^7.0.27",
"@types/mocha": "^2.2.44",
"chai": "^4.1.2",
"mocha": "^4.0.1",
"sequelize-typescript": "^0.6.1",
"ts-node": "^3.3.0",
"tslint": "^5.8.0",
"tslint-config-standard": "^7.0.0",
"typescript": "^2.5.3"
}
Thanks, it is reproducable now. I will investigate it.
Fixed in v1.7.6
As on tin - running into this error suddenly when trying to "Update Imports". Probably some code I wrote, however...running tsc, the typescript compiles fine.
Considering there's no context outside of the package itself, not sure what's going wrong here. LMK if you need any additional info.