jupyter / jupyter-js-notebook

JupyterLab notebook
BSD 3-Clause "New" or "Revised" License
46 stars 18 forks source link

Missing dependency on ansi-up #210

Closed albop closed 8 years ago

albop commented 8 years ago

Running the console example produces:

ERROR in ../~/jupyter-js-ui/lib/renderers/index.js
Module not found: Error: Cannot resolve module 'ansi_up' in /home/pablo/Source/jupyter-js-notebook/examples/node_modules/jupyter-js-ui/lib/renderers
 @ ../~/jupyter-js-ui/lib/renderers/index.js 10:16-34
blink1073 commented 8 years ago

Hi @albop, what is the output of npm -v?

albop commented 8 years ago

I have:

npm --version
2.14.20 

Could it just be that ansi_up is not listed in the dependencies ? If I install it manually, it works.

blink1073 commented 8 years ago

Can you try pulling from master, removing node_modules from the example and building it again? I believe this should be fixed now.

albop commented 8 years ago

@blink1073 : last pull reintroduced the bug I was seeing before https://github.com/jupyter/jupyter-js-notebook/pull/209 , i.e.,

> tsc --project src && webpack --config webpack.conf.js

src/index.ts(81,7): error TS2322: Type 'JavascriptRenderer' is not assignable to type 'IRenderer<Widget>'.
  Types of property 'render' are incompatible.
    Type '(mimetype: string, data: string) => Widget' is not assignable to type '(mimetype: string, data: string) => Widget'.
      Type 'Widget' is not assignable to type 'Widget'.
        Types of property 'layout' are incompatible.
          Type 'Layout' is not assignable to type 'Layout'.
            Property 'initialize' is protected but type 'Layout' is not a class derived from 'Layout'.
src/index.ts(86,54): error TS2345: Argument of type 'RenderMime<Widget>' is not assignable to parameter of type 'RenderMime<Widget>'.
  Types of property 'clone' are incompatible.
    Type '() => RenderMime<Widget>' is not assignable to type '() => RenderMime<Widget>'.
      Type 'RenderMime<Widget>' is not assignable to type 'RenderMime<Widget>'.
blink1073 commented 8 years ago

I think you may still have stale files. Do you mind running git clean -dfx from the root of the repo and running the example install instructions again?

albop commented 8 years ago

I did try it, but I get the same error message.

blink1073 commented 8 years ago

Looks like I missed a dependency, should be fixed by https://github.com/jupyter/jupyter-js-notebook/pull/216.

albop commented 8 years ago

It works now !

blink1073 commented 8 years ago

Great!