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

ObservableHQ issue #37

Open
ctzurcanu opened this issue Jan 11, 2023 · 4 comments
Open

ObservableHQ issue #37

ctzurcanu opened this issue Jan 11, 2023 · 4 comments

Comments

@ctzurcanu
Copy link

Tried to use this in Observable https://observablehq.com/ :

webeid = require('web-eid/web-eid.js')
webeid.getVersion()

Error: App has disappeared

seemingly the VERSION is: "0.0.5"

@ctzurcanu
Copy link
Author

same error in React:

web-eid.js:61 Uncaught (in promise) Error: App has disappeared
at web-eid.js:61:1
at new Promise ()
at msg2promise (web-eid.js:56:1)
at fields.getVersion (web-eid.js:83:1)
at Module. (index.js:11:1)
at ./src/index.js (index.js:17:1)
at webpack_require (bootstrap:851:1)
at fn (bootstrap:150:1)
at 1 (index.js:17:1)
at webpack_require (bootstrap:851:1)
at checkDeferredModules (bootstrap:45:1)
at Array.webpackJsonpCallback [as push] (bootstrap:32:1)
at main.chunk.js:1:81

@mrts
Copy link
Member

mrts commented Jan 13, 2023

Hi, @ctzurcanu!

This is the old version published in NPM by previous project. We just recently got rights for NPM and will publish a new version there when we are ready for this.

Meanwhile please use the GitLab Package Registry as written in the docs to install the latest official version:

echo @web-eid:registry=https://gitlab.com/api/v4/packages/npm >> .npmrc
npm install @web-eid/web-eid-library

@ctzurcanu
Copy link
Author

unfortunately, that is not an option. In that context:
require('web-eid/web-eid.js') // works
require('@web-eid/web-eid-library') // does not work

https://observablehq.com/@observablehq/module-require-debugger offers no solutions for importing @web-eid/web-eid-library

Is there a file that can be included by <script src="file.js"> for ver. 2?

@mrts
Copy link
Member

mrts commented Jan 13, 2023

Sure, you can include web-eid.js directly. Each release contains a pre-built ZIP with ES module, IIFE and UMD builds, see https://github.com/web-eid/web-eid.js/releases/tag/v2.0.1:
image

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

No branches or pull requests

2 participants