Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated electron version #17

Closed
wants to merge 1 commit into from
Closed

Conversation

Salakar
Copy link

@Salakar Salakar commented Jan 21, 2016

Updated electron package version to the latest.

Without this Babel 6 via require hook would not work if using util.inherits, investigation seemed to point towards "use strict" and Object.prototype being read only, seems babel or electron was forcing strictness in that scenario on the older version.

Error stack:

/MY_PROJECT_DIR/node_modules/babel-core/lib/transformation/file/index.js:548
      throw err;
      ^

TypeError: /MY_PROJECT_DIR/api/hooks/hive/queue.js: Cannot set property 'Symbol(should not be considered a local binding)' of undefined
    at Object.push (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/node_modules/babel-helper-define-map/lib/index.js:96:37)
    at [object Object].pushToMap (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js:191:25)
    at [object Object].pushMethod (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js:531:10)
    at [object Object].pushBody (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js:312:16)
    at [object Object].buildBody (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js:244:10)
    at [object Object].run (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js:151:10)
    at PluginPass.ClassExpression (/MY_PROJECT_DIR/node_modules/babel-plugin-transform-es2015-classes/lib/index.js:63:60)
    at newFn (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/visitors.js:293:19)
    at NodePath._call (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/path/context.js:74:18)
    at NodePath.call (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/path/context.js:46:17)
    at NodePath.visit (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/path/context.js:104:12)
    at TraversalContext.visitQueue (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/context.js:153:16)
    at TraversalContext.visitSingle (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/context.js:113:19)
    at TraversalContext.visit (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/context.js:197:19)
    at Function.traverse.node (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/index.js:139:17)
    at NodePath.visit (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/path/context.js:114:22)
    at TraversalContext.visitQueue (/MY_PROJECT_DIR/node_modules/babel-traverse/lib/context.js:153:16)

Tried disabling various babel plugins to no effect, in the end the Electron update did the trick.

Preset babel-preset-es2015-node5 now works perfectly. As does just es2015.

@Salakar Salakar mentioned this pull request Jan 21, 2016
@mattdesl
Copy link
Contributor

Sadly we can't upgrade yet because the newest version of Electron crashes the inspector regularly (at least on OSX).

So this PR will be on hold until this is figured out:
electron/electron#3832 (comment)

Thanks for testing. Maybe there is another way we can tackle this in the mean time?

@Salakar
Copy link
Author

Salakar commented Jan 21, 2016

I'm on OSX myself, not had a crash yet. Been using it for a couple hours straight, with Babel 6 and my PR version.

Anything specific it crashes on? I'm running a fairly large project and not had a problem.

@mattdesl
Copy link
Contributor

I will give it a bit more testing and let you know.

@Salakar
Copy link
Author

Salakar commented Jan 21, 2016

I'm on OSX El Captain v10.11, if that makes a difference.

@mattdesl
Copy link
Contributor

Something I just noticed - debugging gulp-sass is failing due to native dependency in this new version of Electron. The old version (that devtool is using) works fine, though.

@Salakar
Copy link
Author

Salakar commented Jan 21, 2016

Whats the failure error on gulp?

@mattdesl
Copy link
Contributor

Error: The `libsass` binding was not found in /projects/jam3npm/devtool-examples/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-47/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.
    at Object.sass.getBinaryPath (extensions.js:158)
    at Object.<anonymous> (index.js:16)
    at Module._compile (module.js:425)
    at Object.devtoolCompileModule [as .js] (/projects/jam3npm/devtool/lib/require-hook.js:36)
    at Module.load (module.js:356)
    at Function.Module._load (module.js:313)
    at Module.require (module.js:366)
    at require (module.js:385)
    at Object.<anonymous> (index.js:183)
    at Module._compile (module.js:425)

@Salakar
Copy link
Author

Salakar commented Jan 21, 2016

What version of node are you running locally? That looks like you're way lower than the one electron uses, 5.1.1 in the latest electron version. I could be wrong though, but I occasionally get this when upgrading node versions. See this issue.

@mattdesl
Copy link
Contributor

Thanks for the info. I think it should be OK to upgrade to the newest Electron, and it might also help with other bugs like #15. I will revert back if I run into any major problems.

Sorry I didn't merge your PR... Next time!

@mattdesl mattdesl closed this Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants