tststs / atom-ternjs

JavaScript code intelligence for atom with tern.js and autocomplete-plus
MIT License
627 stars 76 forks source link

Fix libs and plugins detection without local package.json #367

Open artch opened 5 years ago

artch commented 5 years ago

What is expected: If the local project folder does not have package.json and node_modules, the libs and plugins detection should skip it and go to atom-ternjs/node_modules package.

What is happening: If the local project folder does not have package.json and node_modules, it throws an error Cannot find module tern-mylib, despite it is present in atom-ternjs/node_modules/tern-mylib.

This PR fixes this using an additional try/catch block.