Nylas-mail: Can't build it from source on El Capitan

Created on 13 Sep 2016  Â·  9Comments  Â·  Source: nylas/nylas-mail

I am using the version `0.4

Uncaught Exception:
Error: Module version mismatch. Expected 48, got 49.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:169:18)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Applications/Nylas N1.app/Contents/Resources/app.asar/node_modules/nslog/lib/nslog.js:5:11)
Are there any related issues?

...

What operating system are you using?

...

What version of N1 are you using?

...

Bug?

Do you have any third-party plugins installed? If so, which ones?

...

Is the issue related to a specific email provider (Gmail, Exchange, etc.)?

...

Is the issue reproducible with a particular attachment, message, signature, etc?

...

Feature Request?

Does this feature exist in another mail client or tool you use?

...

All 9 comments

Hi @anmoljagetia — if you had an old checked out version but haven't built it in a while, you may need to re-run script/bootstrap. If that doesn't work, it may be that the local node_modules folder, or the electron folder are out of sync. Delete both those folders from the working directory and re-run script/bootstrap. Hope that helps!

I installed the dependencies by running the following :

npm install 
then npm script/bootstrap
followed by npm script/build

This is my first time trying to use N1, awesome job guys, this looks absolutely well made and amazing!

@anmoljagetia. You have to remove your node modules then only run script/bootstrap. script/bootstrap. You can not manually run npm install because it will erroneously compile native modules against the wrong headers. script/bootstrap ensures everything compiles against Electron properly (via apm).

You also don't need to run script/build. This is what packages up the app when we're ready to release a production version of it. It basically copies over non-dev files and compiles / minifies ES6 & coffeescript.

Hey! Yep—just wanted to follow up, do not manually run npm install. (NPM install builds node modules for your system version of NodeJS, not Electron.) I'll see if we can make this produce an error message in the future.

Hey guys, running

node script/bootstrap

give me the following error :

`
/Users/anmol.j/Personal/N1/script/bootstrap:23
const {cwd, env} = Object.assign({cwd: '.', env: 'system'}, options);
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
`

I did a recent git clone, and am on the same branch as master.

Same problem here, I cloned the repository today and I can not compile, same error, anyone?

you should change source of script/bootstrap
const {cwd, env} = Object.assign({cwd: '.', env: 'system'}, options);
to =>
cwd = Object.assign({cwd: '.', env: 'system'}, options['cwd']);
env = Object.assign({cwd: '.', env: 'system'}, options)['env'];

Thanks but nothing happen

walo@non-serviam:~/Git/N1$ script/bootstrap

-- Running npm install in ./[object Object] with system config --
walo@non-serviam:~/Git/N1$

??

@anmoljagetia @eduardohurtado You need to update your nodejs to at least v6.9.2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dariosm picture dariosm  Â·  4Comments

luferogo picture luferogo  Â·  3Comments

hazim1093 picture hazim1093  Â·  4Comments

runofthemill picture runofthemill  Â·  3Comments

petrk94 picture petrk94  Â·  4Comments