I'm trying to make an electron app. However, my work stuck on very beginning: the require keyword gives me a string, instead of module object.
electron = require('electron')
console.log(electron)
It prints:
/path/to/my/project/node_modules/_electron@1.6.11@electron/dist/electron
, that totally cannot be used as a module.
In comparison, if I import a built-in module, or another npm-installed module:
fs = require('fs')
console.log(fs)
mkdirp = require('mkdirp')
console.log(mkdirp)
It prints object hierarchy, including variables and functions.
The following are contents of election directory, I don't know if they are healthy:
$ ls node_modules/electron
appveyor.yml cli.js CONTRIBUTING.md dist electron.d.ts index.js install.js issue_template.md LICENSE node_modules package.json path.txt README.md test