DesignRevision/shards-dashboard-react

Failed to compile on running the start command

pereiraryan opened this issue ยท 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

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

Maybe was a good idea to add this on the README

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

same issue here

hisk commented

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

Make sure to run git clone git@github.com:DesignRevision/shards-dashboard-react.git --recurse-submodules to clone the repo (including its submodules) and let me know how it goes. ๐Ÿ˜„

@hisk I cant clone , give me this error
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

hisk commented

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

[submodule "src/shards-dashboard"]
	path = src/shards-dashboard
	url = git@github.com: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 I do the following

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

And works!! thanks!!

kik-o commented

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

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...

hisk commented

@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.

@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!

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

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

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

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

It works! Thank you!

worked for me

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

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

This worked for me. Thanks !

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

git@github.com: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!

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

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

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

@kk-o
Try to edit .git/config file
And replace submodule's url (from git@github.com: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