generator-sails-rest-api icon indicating copy to clipboard operation
generator-sails-rest-api copied to clipboard

not able to run the api

Open ghost opened this issue 6 years ago • 6 comments

TypeError: _.chain(...).keyBy is not a function at Object.getPathItem (E:\webauctionsplus fix\WebAuction Api v2\api\hooks\swagger\lib\xfmr.js:160:8) at _.mapValues.pathGroup (E:\webauctionsplus fix\WebAuction Api v2\api\hooks\swagger\lib\xfmr.js:126:26) at E:\webauctionsplus fix\WebAuction Api v2\node_modules\lodash\index.js:3395:24 at E:\webauctionsplus fix\WebAuction Api v2\node_modules\lodash\index.js:3073:15 at baseForOwn (E:\webauctionsplus fix\WebAuction Api v2\node_modules\lodash\index.js:2046:14) at Function.mapValues (E:\webauctionsplus fix\WebAuction Api v2\node_modules\lodash\index.js:3394:9) at Object.getPaths (E:\webauctionsplus fix\WebAuction Api v2\api\hooks\swagger\lib\xfmr.js:125:14) at Object.getSwagger (E:\webauctionsplus fix\WebAuction Api v2\api\hooks\swagger\lib\xfmr.js:32:26) at sails.after (E:\webauctionsplus fix\WebAuction Api v2\api\hooks\swagger\index.js:31:25) at E:\webauctionsplus fix\WebAuction Api v2\node_modules\sails\lib\app\private\after.js:91:14 at E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:721:13 at E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:52:16 at done (E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:246:17) at E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:44:16 at Sails. (E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:718:17) at Sails. (E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:167:37) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:106:13) at Sails.emit (events.js:208:7) at Sails.emitter.emit (E:\webauctionsplus fix\WebAuction Api v2\node_modules\sails\lib\app\private\after.js:50:11) at sailsReady (E:\webauctionsplus fix\WebAuction Api v2\node_modules\sails\lib\app\lift.js:53:11) at E:\webauctionsplus fix\WebAuction Api v2\node_modules\async\lib\async.js:721:13 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-04-23T14_13_12_867Z-debug.log

ghost avatar Apr 23 '18 14:04 ghost

I believe this is related to lodash package. The generator doesn't pin dependencies versions, so when it installs packages, lodash is installing with breaking version.

ghaiklor avatar Apr 24 '18 11:04 ghaiklor

can you send me a working package json / a fix for that

ghost avatar Apr 24 '18 13:04 ghost

@LarsE343 You can install needed lodash version yourself via npm install. I can't send you the package.json with all the working dependencies.

ghaiklor avatar Apr 25 '18 09:04 ghaiklor

So what is the necessary version of loadash ?

moda20 avatar May 29 '18 13:05 moda20

@ghost, @moda20 Did you figure out the exact lodash version?

binnyg avatar Jul 10 '18 03:07 binnyg

I just installed lodash latest via npm, it worked

moda20 avatar Jul 10 '18 07:07 moda20