Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

electron update failed #1897

Closed
josselinchevalay opened this issue Feb 24, 2019 · 7 comments
Closed

electron update failed #1897

josselinchevalay opened this issue Feb 24, 2019 · 7 comments
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up

Comments

@josselinchevalay
Copy link
Contributor

Hello

  • 0.35.0-pre.0
  • Linux 64
  • Debian

Type:

Bug

Severity:

Critical - My application in electron not works

Description:

 return acquireLock(file, { ...options, stale: 0 }, callback);
                                               ^^^
SyntaxError: Unexpected token ...
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.require.extensions.(anonymous function) [as .js] (/home/josselin/develop/telescope/node_modules/electron-compile/lib/require-hook.js:77:14)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

Steps to reproduce the error:

  • Update electron and ipfs in package.json
    "electron": "^2.0.0",
    "electron-rebuild": "^1.7.2",
    "ipfs":"js-ipfs"

  • run npm install

  • run electron start .

@hugomrdias
Copy link
Member

this is valid js what is your runtime env in electron ? can't you just transpile object spread with babel ?

@josselinchevalay
Copy link
Contributor Author

how to check electron env runtime ?

@hugomrdias
Copy link
Member

from my limited experience with electron it should be based on chromium which should support object spread unless it is really old version.
@olizilla or @hacdias can you help here ?

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/expert Having worked on the specific codebase is important status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels Mar 12, 2019
@elantion
Copy link

elantion commented Mar 25, 2019

Facing same issue. Try to update electron from 2.* to 4.*, but no luck. Occur another error.

Uncaught Exception:
Error: Unable to update lock within the stale threshold
    at options.fs.stat (/Users/yinjames/Projects/lc-ipfs/node_modules/proper-lockfile/lib/lockfile.js:121:25)
    at /Users/yinjames/Projects/lc-ipfs/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:155:5)

Please help me out. Thanks a lot.

josselinchevalay added a commit to josselinchevalay/node-ipfs that referenced this issue Mar 25, 2019
hello with this version of electron seems works on my system. and seems resolve issue with ipfs#1897
josselinchevalay added a commit to josselinchevalay/node-ipfs that referenced this issue Mar 25, 2019
hello with this version of electron seems works on my system. and seems resolve issue with ipfs#1897
@josselinchevalay
Copy link
Contributor Author

my pull request solve issue with examples but in my code when a use elactron in version 4 and use build.sh script i continue to have same issue. 🤔 weird ....

@josselinchevalay
Copy link
Contributor Author

i created a issue on this project moxystudio/node-proper-lockfile#84

@alanshaw
Copy link
Member

alanshaw commented May 3, 2019

Lets track this here now #2011

@alanshaw alanshaw closed this as completed May 3, 2019
@ghost ghost removed the status/ready Ready to be worked label May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

4 participants