Skip to content

Module not found #84

@Hammond2789

Description

@Hammond2789

./node_modules/vega-embed/build/src/embed.js
Module not found: Can't resolve 'vega-lite' in 'E:\polymerui\polymerui\node_modules\vega-embed\build\src'

In my dependencies
"react-vega": "^7.1.1",
"vega": "^5.9.1",
"vega-lite": "^4.0.2",

So I am currently working in react (obviously).

To start with I ran

npm install react vega vega-lite react-vega --save

I did no other npm installs.

Imported vega into one of my components.

import { Vega } from 'react-vega';

Added a component using one of the examples.

<Vega spec={this.state.spec} data={this.data} signalListeners={this.statesignalListeners} />

Using also things from the examples

spec: {
      "width": 400,
      "height": 200,
      "data": [{ "name": "table" }],
      "signals": [
        {
          "name": "tooltip",
          "value": {},
          "on": [
            { "events": "rect:mouseover", "update": "datum" },
            { "events": "rect:mouseout", "update": "{}" }
          ]
        }
      ],
    },
    signalListeners: { hover: this.handleHover }

...
handleHover = (args) => {
console.log(args);
}
`I refresh the page and the error comes up.

I cannot argue with the error, that file does not exist there, I am just confused why its looking for it there.


Or if I use

{ReactDOM.render(, document.getElementById('bar-container') ) }
I get the error

./node_modules/vega-encode/node_modules/vega-util/index.js
Error: ENOENT: no such file or directory, open 'E:\polymerui\polymerui\node_modules\vega-encode\node_modules\vega-util\index.js'


Sorry for writing this issue twice, I accidentally closed it in an edit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions