Skip to content

Instantly share code, notes, and snippets.



Created Apr 11, 2016
What would you like to do?

I have a react js code.

  • I am trying to import other modules into my jsx.

  • for all other modules its working fine.

  • but for this module sports-display-container alone its expecting path which is not the correct way.

  • can you guys tell me how to debug the import statements to make the sports-players to make it work by not mentioning the path name

  • providing the import staments code alone below **- sports-display-container --- is a separate module

  • working: import Display from '../../../sports-display-container';**

  • not-working: import Display from 'sports-display-container';

  • is there a way to debug import staments separately

  • even package.json is fine for sports-display-container


    import React from 'react';
    import BasketballPage from './template';
    import BasketballPageCaptain from './template-captain';
    import './display.css';
    import Display from 'sports-display-container';
    import {cricketDisplay, volleyBallDisplay, soccerDisplay} from '../utils/display-utils';
    - cannot find module sports-display-container

This comment has been minimized.

Copy link

@IanZhao IanZhao commented Apr 12, 2016

what is the structure of your project diretory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment