Uncaught Error: Cannot find module ‘jquery’

tl;dr In contrast to a normal nodejs app, where you have access to global modules (e.g. located in /usr/bin/node), electron doesn’t automatically set the NODE_PATH environment variables. You have to set it manually to all the paths containing your desired modules. Update: The answer to the question why require(“ipc”) is working and require(“jquery”) not? is … Read more

How to replace tabs with spaces in Atom?

Atom has a built-in tool for this Activate the command palette (ShiftCmdP on Mac, CtrlShiftP on Windows/Linux) and search for “convert space” or “convert tab”. You should find these three commands are available: Whitespace: Convert Spaces to Tabs Whitespace: Convert Tabs to Spaces Whitespace: Convert All Tabs to Spaces Convert Tabs vs. Convert All Tabs … Read more

Atom exclude node_modules folder from search

Steps Launch atom From the menu: edit > preferences (atom > prefernces on Mac) From the side menu, click the button “Open Config Folder” Now a new atom IDE should open. Open the file “config.cson” Add ignoredNames: [“node_modules”] under core Example of a config.cson “*”: core: ignoredNames: [ “.git” “node_modules” ] editor: {} minimap: plugins: … Read more

How to share/transfer an Atom installation (packages and settings) from one Mac to another?

There are several ways to synchronize your settings and packages between Atom installations: Git: Create a public or private Git repo and store the contents of your local ~/.atom folder in there. Ignore the following files/directories in a .gitignore file: storage compile-cache dev .npm .node-gyp Use a package like sync-settings. This will store your configuration … Read more