develar/onshape-desktop-shell

Cannot `npm start`

TylerLeonhardt opened this issue · 3 comments

I was using this as an example for an electron app I've been working on.

I downloaded the app and ran npm start

and got

The app provided is not a valid Electron app, please read the docs on how to write one:
https://github.com/electron/electron/tree/v0.37.7/docs

Error: Cannot find module '../build/Release/nslog.node'

How can I resolve this?

@tylerl0706

  1. Please ensure that you install git lfs
  2. It seems that nslog is not compiled on your platform. You can try to solve it, or just remove it from dependencies (not important if use as example).

I've installed git lfs and removed nslog as a dependency by removing it from the package.json & commenting out:

https://github.com/develar/onshape-desktop-shell/blob/master/src/util.ts#L9-L19

Thid is what I get:

onshape-desktop-shell-master 2 npm start

> @ start /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2
> npm install && npm run compile && electron ./app


> undefined postinstall /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2
> install-app-deps

Installing app dependencies for arch x64 to /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/app

> keytar@3.0.1 install /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/app/node_modules/keytar
> node-gyp rebuild

  CXX(target) Release/obj.target/keytar/src/main.o
In file included from ../src/main.cc:1:
../../nan/nan.h:582:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:588:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:593:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:599:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
4 errors generated.
make: *** [Release/obj.target/keytar/src/main.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/app/node_modules/keytar
gyp ERR! node -v v5.8.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "install" "--production"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE

npm ERR! keytar@3.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keytar@3.0.1 install script 'node-gyp rebuild'.
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 keytar package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs keytar
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls keytar
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/app/npm-debug.log
Unhandled rejection Error: /usr/local/bin/node exited with code 1
    at ChildProcess.<anonymous> (/Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/util.ts:106:69)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
From previous event:
    at spawn (/Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/util.ts:104:10)
    at Object.installDependencies (/Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/util.ts:48:9)
    at /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/install-app-deps.ts:26:2
    at [object Generator].next (native)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at tsAwaiter (/Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/awaiter.ts:10:51)
    at main (/Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/install-app-deps.ts:19:3)
    at Object.<anonymous> (/Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/node_modules/electron-builder/src/install-app-deps.ts:31:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:141:18)
    at node.js:933:3

npm WARN optional Skipping failed optional dependency /7zip-bin/7zip-bin-win:
npm WARN notsup Not compatible with your operating system or architecture: 7zip-bin-win@0.0.1

> @ compile /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2
> rimraf app/out && tsconfig -i 2 && tsc

src/util.ts(19,1): error TS1128: Declaration or statement expected.

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "compile"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! @ compile: `rimraf app/out && tsconfig -i 2 && tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ compile script 'rimraf app/out && tsconfig -i 2 && tsc'.
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  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rimraf app/out && tsconfig -i 2 && tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/npm-debug.log

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! @ start: `npm install && npm run compile && electron ./app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script 'npm install && npm run compile && electron ./app'.
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  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm install && npm run compile && electron ./app
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tylerleonhardt/Downloads/onshape-desktop-shell-master 2/npm-debug.log

@tylerl0706 Wel, you can remove keytar deps also. Or try to remove app/node_modules directory and install again.