Use atom-keymap in a js app


I have a js application that I want to have keyboard command handling such as atom-keymap so I installed it via npm. I run my app using webpack and when I run it the atom-keymap is looking for nodejs modules like the one below.

Module not found: Error: Cannot resolve module ‘fs’ in D:\Projects\SomeProject\node_modules\atom-keymap\node_modules\season\node_modules\cson-parser\node_modules\coffee-script\lib\coffee-script@ ./~/atom-keymap/~/season/~/cson-parser/~/coffee-script/lib/coffee-script/repl.js 5:7-20

Is there some setup needed for this to be used in a project or is this not usable out of the box?


You don’t have a topic set. Is this for Atom or Electron?


It sounds like this isn’t for Atom or Electron.

The Atom packages are generally dependent on Node and Chromium. Even the ones on npm aren’t generally designed to be run outside of the Atom environment. You might be able to copy some of the strategies that atom-keymap employs … but using it directly sounds like it isn’t going to work for your use case, unless I’m misunderstanding something?


Sorry, this was my first post so I was not able to properly follow guidelines such as topic. This is not for atom or electron at @leedohm has mentioned below.


Thank you for your response. Yes you are right, it is not usable for my case. I thought the ones on npm are usable out of the box. I just need to study the concepts that atom does and probably create something similar.