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

Bump and pin dependencies per-release #478

Open
luppiterw opened this issue Oct 16, 2019 · 8 comments
Open

Bump and pin dependencies per-release #478

luppiterw opened this issue Oct 16, 2019 · 8 comments
Assignees

Comments

@luppiterw
Copy link

Codes under work well some times before, but never worknow :
try { autobahn = require('autobahn'); } catch (e) { console.log("wamp_orbital.js.connectServer exception = " +e); return; }
Exception occurs:

wamp_orbital.js.connectServer exception = TypeError [ERR_NO_ICU]: "fatal" option is not supported on Node.js compiled without ICU

Since I didn't meet such errors before, and I didn't change any code, maybe there is some difference in node-version or Electron-version, but I forgot corrent ones.

node -v v12.10.0
electron 2.0.8

Anyone met the same problem as me?

@luppiterw
Copy link
Author

Any one can help me ? sos~~~~

@peterforgacs
Copy link

peterforgacs commented Dec 5, 2019

Any one can help me ? sos~~~~

If you need it SOS this fork is actually functional in Electron but about 50 commits behind ~HEAD. You can git link it your npm package and should work.

@luppiterw
Copy link
Author

Any one can help me ? sos~~~~

If you need it SOS this fork is actually functional in Electron but about 50 commits behind ~HEAD. You can git link it your npm package and should work.

I solved my problem by spcify spcific version of related modules

@om26er
Copy link
Contributor

om26er commented Dec 6, 2019

I have just released a new version of ABJS, kindly test it and provide feedback if it fixes the electron issue.

@peterforgacs
Copy link

Thanks, this works with electron >= 4.0.0 but produces the same error on older electron versions.

In this case, this is caused by the cbor dependency increased the minimum required Node.js version in its latest stable version, which older electrons do not support.

This would not be a problem in itself, they follow semver. The problem is that autobahn only sets a minimum version requirement in the package.json. (>=)

This causes all clients to install the latest stable version of the dependency. And there is no guarantee that the latest stable version of the dependency Node.js requirement is in line with the specific electron Node.js version.

As a possible long term solution:

Can we fixate the concrete versions for the dependencies? Instead of cbor >= 3.0.0 cbor 3.0.0 etc. ( Same holds true for other dependencies )

This would make autobahn much more stable in electron in the long run.

Created a test repo to illustrate the problem here.

You can change the electron version and see how it behaves differently.

@oberstet
Copy link
Contributor

oberstet commented Dec 6, 2019

The problem is that autobahn only sets a minimum version requirement in the package.json. (>=) ... Can we fixate the concrete versions for the dependencies?

ok, right. how about this?

  1. pinning versions of dependencies in package.json (as you suggest)
  2. bumping up all dep versions before we push a new autobahn release
  1. is to ensure that we follow the latest upstream version .. "current master is gold". this is the approach we follow in all our stuff. should a certain version upgrade (of some dep) then fail to work for you, you can just use the older autobahn (with the pinned older deps).

.. this works with electron >= 4.0.0 but produces the same error on older electron versions.

electron is at version 7.0 .. 4.0 seems quite old

@peterforgacs
Copy link

pinning versions of dependencies in package.json (as you suggest)
bumping up all dep versions before we push a new autobahn release
should a certain version upgrade (of some dep) then fail to work for you, you can just use the older autobahn (with the pinned older deps).

Sounds great!

electron is at version 7.0 .. 4.0 seems quite old

Electron changed its versioning system about a year ago. Now they strictly follow semver.
You can see the release dates here.
For example, the last update for v2 was in march it runs Node.js 8 and compatible until cbor: 4.1.5.

In my experience, it's really common that projects are using older electron versions. Changing the major version of big electron application requires quite lot of work. Both the Node.js runtime and the Chrome version changes and potential dependency incompatibilities might arise. Most of the time cost - benefit ratio does not justify the upgrade.

@oberstet
Copy link
Contributor

oberstet commented Dec 6, 2019

Sounds great!

alright, then we'll do that. changing issue label to enhancement ..

Electron changed its versioning system about a year ago. .... Changing the major version of big electron application requires quite lot of work.

thanks for explaining! understood & agreed

@oberstet oberstet changed the title require('autobahn') in Electron , ERR_NO_ICU exception occurs Bump and pin dependencies per-release Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants