shards-dashboard-react icon indicating copy to clipboard operation
shards-dashboard-react copied to clipboard

Failed to compile on running the start command

Open pereiraryan opened this issue 5 years ago • 19 comments

I cloned this repo and followed the steps to start the local development server. The very same moment the app crashes saying

`./src/App.js
Module not found: Can't resolve './shards-dashboard/styles/shards-dashboards.1.1.0.min.css'


Screen Shot 2019-04-17 at 3 34 48 PM

pereiraryan avatar Apr 17 '19 10:04 pereiraryan

That folder is a git submodule on this project, you will need to run:

$ git submodule init $ git submodule update

So it will download the dependency

AdrianoMoura avatar Apr 25 '19 17:04 AdrianoMoura

Maybe was a good idea to add this on the README

AdrianoMoura avatar Apr 25 '19 17:04 AdrianoMoura

I've tried your suggestion but it's asking for .ssh/id_rsa key

sunnixx avatar Apr 26 '19 04:04 sunnixx

same issue here

DonsWayo avatar May 06 '19 15:05 DonsWayo

@pereiraryan @sunnixx @DonsWayo I apologize for the delay.

Make sure to run git clone [email protected]:DesignRevision/shards-dashboard-react.git --recurse-submodules to clone the repo (including its submodules) and let me know how it goes. 😄

hisk avatar May 06 '19 15:05 hisk

@hisk I cant clone , give me this error [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

DonsWayo avatar May 06 '19 18:05 DonsWayo

@DonsWayo Can you please try to replace the contents of the .gitmodules file from:

[submodule "src/shards-dashboard"]
	path = src/shards-dashboard
	url = [email protected]:DesignRevision/shards-dashboard.git
	branch = master

Into the following:

[submodule "src/shards-dashboard"]
	path = src/shards-dashboard
	url = https://github.com/DesignRevision/shards-dashboard.git
	branch = master

Afterwards, you can run the commands provided by @AdrianoMoura:

git submodule init && git submodule update

Please let me know if this fixes the issue for you. 😊

hisk avatar May 06 '19 18:05 hisk

@hisk I do the following

  • clone the master
  • add your latest suggestion
  • npm i -npm start

And works!! thanks!!

DonsWayo avatar May 06 '19 19:05 DonsWayo

Still not working for me, running macOS Mojave with Firefox/WebStorm

  1. Cloned master by downloading zip file
  2. Unzipped file, opened in WebStorm
  3. Added your suggestion 3a. url = https://github.com/DesignRevision/shards-dashboard.git
  4. Proceeded to run npm install, then npm start

Still getting:

"Failed to compile" : Module not found: Can't resolve './shards-dashboard/styles/shards-dashboards.1.1.0.min.css' in '/Users/kiko/Downloads/shards-dashboard-react-master/src'

..any other tips?

Update: Attempted $ git submodule init but was prompted with:

fatal: not a git repository (or any of the parent directories): .git

kik-o avatar May 09 '19 21:05 kik-o

I was able to get by this problem temporarily by copying the contents of the dependency (here https://github.com/DesignRevision/shards-dashboard/tree/525efdca736a2203b8c3e5f8f64c766841e71c57) into /src/shards-dashboard. It at least runs...

tannerhallman avatar May 13 '19 01:05 tannerhallman

@kk-o Can you please start again from scratch by cloning the repo, applying the changes and running the commands I've mentioned earlier and see if the issue persists?

If it does, can you please provide a snapshot of your directory structure so I can check?

Thank you! I am waiting for your feedback.

hisk avatar May 14 '19 10:05 hisk

@kk-o Can you please start again from scratch by cloning the repo, applying the changes and running the commands I've mentioned earlier and see if the issue persists?

If it does, can you please provide a snapshot of your directory structure so I can check?

Thank you! I am waiting for your feedback.

I can also confirm that the following works.

  1. Clone the master (doesn't work if you download as zip)
  2. Inside .gitmodules, replace the content to below

[submodule "src/shards-dashboard"] path = src/shards-dashboard url = https://github.com/DesignRevision/shards-dashboard.git branch = master

  1. Run the command git submodule init && git submodule update

  2. Install the npm packages and start!

moona3k avatar May 29 '19 18:05 moona3k

@kk-o Try to edit .git/config file

And replace submodule's url (from [email protected]:DesignRevision/shards-dashboard.git to https://github.com/DesignRevision/shards-dashboard.git)

caomanhquang avatar Jun 02 '19 22:06 caomanhquang

@kk-o Try to edit .git/config file

And replace submodule's url (from [email protected]:DesignRevision/shards-dashboard.git to https://github.com/DesignRevision/shards-dashboard.git)

It works! Thank you!

nieyuda avatar Jun 20 '19 08:06 nieyuda

worked for me

leslie-alldridge avatar Sep 07 '19 04:09 leslie-alldridge

@kk-o Try to edit .git/config file

And replace submodule's url (from [email protected]:DesignRevision/shards-dashboard.git to https://github.com/DesignRevision/shards-dashboard.git)

This worked for me. Thanks !

essare avatar Nov 30 '19 15:11 essare

Replace the contents of the .gitmodules file to this

[submodule "src/shards-dashboard"]
	path = src/shards-dashboard
	url = https://github.com/DesignRevision/shards-dashboard.git
	branch = master

and Try to run the command git submodule init && git submodule update

If it throws any error just edit the .git/config file and replace

[email protected]:DesignRevision/shards-dashboard.git

to

https://github.com/DesignRevision/shards-dashboard.git

and run command git submodule init && git submodule update and you should be good to go!

Anas-MI avatar Dec 31 '19 10:12 Anas-MI

@kk-o Try to edit .git/config file

And replace submodule's url (from [email protected]:DesignRevision/shards-dashboard.git to https://github.com/DesignRevision/shards-dashboard.git)

I dont have '.git/config' file. What should I do?

amaazahmad2 avatar Jan 16 '20 21:01 amaazahmad2

@kk-o Try to edit .git/config file And replace submodule's url (from [email protected]:DesignRevision/shards-dashboard.git to https://github.com/DesignRevision/shards-dashboard.git)

I dont have '.git/config' file. What should I do?

It will be inside your .git folder

Anas-MI avatar Jan 17 '20 05:01 Anas-MI