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

[WIP] Fix build errors #1430

Merged
merged 6 commits into from
Jun 19, 2017
Merged

Conversation

pbugnion
Copy link
Member

@pbugnion pbugnion commented Jun 19, 2017

As far as I can tell, master has stopped building correctly due to a dependency update (related to this?). This is (probably) only visible off a fresh clone, or at least removing the node_modules in jupyter-widgets-controls. It also occurred on PR #1410.

I think this is due to an update in the type defintions for JQuery. The module definition now reads:

declare module 'jquery' {
    export = factory;
}

declare function factory(window: Window, noGlobal?: boolean): JQueryStatic;

declare const $: JQueryStatic;

This means that the only ways of importing jquery are:

const $ = require('jquery') // uses the exported module 'jquery'
import 'jquery' // uses the global exports, which injects $ into the global namespace

In particular, we were importing jQuery using import * as $ from 'jquery', which is now not allowed.

This is still fairly broken on Travis.

pbugnion added 4 commits June 19, 2017 07:50
The JQuery type definition has changed to disallow `import * as $ from 'jquery'`. Now the
only ways of importing jquery are:

const $ = require('jquery') // uses the exported module 'jquery'
import 'jquery' // uses the global exports, which injects $ into the global namespace

This commit chooses the latter to conform more closely to how other modules are imported.
@maartenbreddels
Copy link
Member

I cannot install ipywidgets at all, also not previous versions. I'll try this fix.

@jasongrout jasongrout added this to the 7.0 milestone Jun 19, 2017
@jasongrout
Copy link
Member

This indicates this will be fixed soon: DefinitelyTyped/DefinitelyTyped@844920f#commitcomment-22611629

@jasongrout
Copy link
Member

The import errors are fixed. If you want to remove your import changes, I'll merge - the es2015.iterable changes still look needed.

@pbugnion
Copy link
Member Author

Ah thanks for checking! I'll do this now.

pbugnion and others added 2 commits June 19, 2017 18:56
A prior commit introduced a global import of jquery to fix a temporary problem
in types. Now not needed.
@jasongrout
Copy link
Member

I added the same fix to jupyter-widgets-base. Thanks!

@jasongrout jasongrout merged commit 777f14a into jupyter-widgets:master Jun 19, 2017
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants