Error building email app from tutorials

I’m trying to build the email app from the tutorials (https://tutorials.safedev.org/email-app/) per the instructions, but I’m getting the error shown below. I’m on OSX and I believe node.js and npm are up to date. I’m new to electron development. Any advice? Thanks
Eric

Darwin 15.6.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "dev"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! safe-mail-tutorial@0.1.2 start: `cross-env NODE_ENV=production electron ./ "dev"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the safe-mail-tutorial@0.1.2 start script 'cross-env NODE_ENV=production electron ./ "dev"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the safe-mail-tutorial package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=production electron ./ "dev"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs safe-mail-tutorial
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls safe-mail-tutorial
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/eric/Desktop/safe_examples/email_app/npm-debug.log
1 Like

Hello Eric,

welcome to the SAFE Developer Community!

In order to help you, could you please post the content of /Users/eric/Desktop/safe_examples/email_app/npm-debug.log?

1 Like

Thanks for replying. Here’s the log file you requested…

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start', 'dev' ]
2 info using npm@3.10.8
3 info using node@v6.9.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle safe-mail-tutorial@0.1.2~prestart: safe-mail-tutorial@0.1.2
6 silly lifecycle safe-mail-tutorial@0.1.2~prestart: no script for prestart, continuing
7 info lifecycle safe-mail-tutorial@0.1.2~start: safe-mail-tutorial@0.1.2
8 verbose lifecycle safe-mail-tutorial@0.1.2~start: unsafe-perm in lifecycle true
9 verbose lifecycle safe-mail-tutorial@0.1.2~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/eric/Desktop/safe_examples/email_app/node_modules/.bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
10 verbose lifecycle safe-mail-tutorial@0.1.2~start: CWD: /Users/eric/Desktop/safe_examples/email_app
11 silly lifecycle safe-mail-tutorial@0.1.2~start: Args: [ '-c', 'cross-env NODE_ENV=production electron ./ "dev"' ]
12 silly lifecycle safe-mail-tutorial@0.1.2~start: Returned: code: 1  signal: null
13 info lifecycle safe-mail-tutorial@0.1.2~start: Failed to exec start script
14 verbose stack Error: safe-mail-tutorial@0.1.2 start: `cross-env NODE_ENV=production electron ./ "dev"`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid safe-mail-tutorial@0.1.2
16 verbose cwd /Users/eric/Desktop/safe_examples/email_app
17 error Darwin 15.6.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "dev"
19 error node v6.9.1
20 error npm  v3.10.8
21 error code ELIFECYCLE
22 error safe-mail-tutorial@0.1.2 start: `cross-env NODE_ENV=production electron ./ "dev"`
22 error Exit status 1
23 error Failed at the safe-mail-tutorial@0.1.2 start script 'cross-env NODE_ENV=production electron ./ "dev"'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the safe-mail-tutorial package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     cross-env NODE_ENV=production electron ./ "dev"
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs safe-mail-tutorial
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls safe-mail-tutorial
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
1 Like

Unforatunely that log was less verbose and little less helpful than I hoped :wink: . Could you run 'cross-env NODE_ENV=production electron ./ "dev directly in that directory and poste the output please?

(And please use ``` – three ticks – to fix the formatting of the paste.)

Thank you!