Open briantully opened 5 years ago
Hey! I ran "yarn package" command in macOS Terminal and it worked fine for me.
Hi. Have you updated Node recently? Try deleting the node_modules
folder and rerunning yarn
.
Actually yes, I did upgrade node from 8.x to current (11.13.0) last week. I'm guessing there is an incompatibility with current in one of the dependencies. I'm going to try to downgrade node to LTS (10.x) and see if that is any better.
No luck. Even after downgrading node to 10.15.3 and removing node_modules and doing a clean install by running yarn
, yarn package
still gives the error where it cannot transpile/compile the global.d.ts and spotify-node-applescript.d.ts files.
yarn package
yarn run v1.15.2
warning ../../package.json: No license field
$ electron-forge package --platform=darwin --arch=x64
✔ Checking your system
✔ Preparing to Package Application for arch: x64
⠙ Compiling ApplicationFailed to compile file: /var/folders/7t/2f8l2q9n289gp4hwwbb8622m0000gn/T/electron-packager/darwin-x64/SpotSpot-darwin-x64/Electron.app/Contents/Resources/app/src/types/global.d.ts
Debug Failure. False expression: Output generation failed
⠹ Compiling ApplicationFailed to compile file: /var/folders/7t/2f8l2q9n289gp4hwwbb8622m0000gn/T/electron-packager/darwin-x64/SpotSpot-darwin-x64/Electron.app/Contents/Resources/app/src/types/spotify-node-applescript.d.ts
Debug Failure. False expression: Output generation failed
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✨ Done in 278.58s.
FYI I'm running Mojave 10.14.4 with the latest Xcode and Xcode CLI tools.
Interestingly, yarn start
serves the app successfully, so it's just the package/compile process that is failing.
¯\_(ツ)_/¯
I think this was down to a corrupt yarn.lock
file. @briantully Please pull master and try again.
Thanks, @will-stone. I tried that, and am able to get a little further during the app compilation. However, now I see the following error:
Packaging ApplicationWARNING: Code sign failed; please retry manually. Error: No identity found for signing.
Is there some special configuration I need to set?
yarn package
yarn run v1.16.0
warning ../../package.json: No license field
$ electron-forge package --platform=darwin --arch=x64
✔ Checking your system
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
⠹ Packaging ApplicationWARNING: Code sign failed; please retry manually. Error: No identity found for signing.
✔ Packaging Application
✨ Done in 45.48s.
When launching the packaged output:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Could not get code signature for running application
at initUpdater (/Users/brian.tully/Sites/SpotSpot/out/SpotSpot-darwin-x64/SpotSpot.app/Contents/Resources/app/node_modules/update-electron-app/index.js:54:15)
at App.opts.electron.app.isReady.opts.electron.app.on (/Users/brian.tully/Sites/SpotSpot/out/SpotSpot-darwin-x64/SpotSpot.app/Contents/Resources/app/node_modules/update-electron-app/index.js:33:43)
at App.emit (events.js:187:15)
You will either need an Apple Developer Account to sign the app or remove this line: https://github.com/will-stone/SpotSpot/blob/master/package.json#L86
Thank you! And thanks for saving me $99 😜
Hmm,I'm still having the same error when launching the packaged output. After removing the line at https://github.com/will-stone/SpotSpot/blob/master/package.json#L86 do I also need to delete my yarn.lock and node_modules directory and do a yarn install
?
You shouldn't have to. That osxSign
key is the only thing that tells Electron Packager to sign the app. It looks like it's still packaging the app. Does the built one not run?
yarn start
works, but yarn package
does not, even after deleting yarn.lock and node_modules and doing a yarn install.
Hey there Will!
Long time no speak. I hope all is well.
I was wondering if you might have an idea why I am seeing the following error when I try to run
yarn make
oryarn package
?