question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with fresh create-react-app

See original GitHub issue

Hi,

I’m trying to give sanddance explorer a test run. Unfortunately it fails to start. This is what I did:

npx create-react-app sd-test
cd sd-test/
# edit pagacke.json
npm start

This is what my dependencies look like:

  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "react": "^16.13.0",
    "react-dom": "^16.13.0",
    "react-scripts": "3.4.0",
    "@deck.gl/core": "6.4",
    "@deck.gl/layers": "6.4",
    "@msrvida/sanddance-explorer": "^2",
    "luma.gl": "6.4",
    "office-ui-fabric-react": "6.204.4",
    "vega": "^5.8"
  },

and my index.js

import React from 'react';
import ReactDOM from 'react-dom';

import * as deck from '@deck.gl/core';
import * as layers from '@deck.gl/layers';
import * as luma from 'luma.gl';
import * as fabric from 'office-ui-fabric-react';
import * as vega from 'vega';
import { Explorer, use } from '@msrvida/sanddance-explorer';

fabric.initializeIcons();

use(fabric, vega, deck, layers, luma);

const data = [
  { a: 1, b: "c1" },
  { a: 1, b: "c2" },
  { a: 2, b: "c3" },
  { a: 3, b: "c4" }
];

const explorerProps = {
    logoClickUrl: 'https://microsoft.github.io/SandDance/',
    mounted: explorer => {
        explorer.load(data);
    }
};

ReactDOM.render(React.createElement(Explorer, explorerProps), document.getElementById('root'));

Both from the docs. On startup it fails with following console error:

Bildschirmfoto 2020-03-12 um 08 01 09

What am I’m doing wrong? Thanks a lot for your help!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
danmarshallcommented, Mar 12, 2020

I will add this to the Readme, thank you for pointing this out

0reactions
t-bookcommented, Mar 12, 2020

@danmarshall yes this did it thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create React App not working - Stack Overflow
1. update the npm version (npm install npm@latest -g) · 2. clear the cache (npm cache clean --force) · 3. create the react...
Read more >
NPX Create React APP Not Working - YouTube
To create a new React App, we use npx command with create - react - app and then project name. It should create...
Read more >
What To Do if create-react-app Doesn't Work
Another rather simple remedy for the create-react-app blues. You can try simply reinstalling the latest version of npm. To check what version of...
Read more >
npx create-react-app is not working · Issue #10132 - GitHub
I am able to solve the problem by first trying to uninstall the npm globally, update the npm, clear the cache then using...
Read more >
A Fresh Create React App But always compiling with Error
So I have just excuted npx create-react-app my-app yet somehow when I run npm start I always get the following Error: Failed to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found