ipfs-shipyard / ipfs-deploy

Zero-Config CLI to Deploy Static Websites to IPFS
Other
1.16k stars 122 forks source link

JSON encoding not supported #89

Closed wakqasahmed closed 3 years ago

wakqasahmed commented 5 years ago

I have deployed my pet-shop using ipd -p infura -p pinata Here is the url:

https://ipfs.io/ipfs/QmT6SgXKChuzz9nCTu8ZNtc8y7wLR3DjvH3rsEkcreiSDG/

I am getting the following error:

invalid ipfs path: invalid path "/ipfs/pets.json": invalid CID: selected encoding not supported

Any ideas?

wakqasahmed commented 5 years ago

Found a workaround, instead of linking ../pets.json as a relative path, I tried its IPFS address and it worked.

Here is the newly deployed address:

https://ipfs.io/ipfs/QmSGjVhzDhtyzyyPBRmsPRtaq7B4AKTFMkncSLx2dGhGKE/

Would love to find the right way though, any ideas?

hacdias commented 3 years ago

This does not seem directly related to how IPFS Deploy works, but with the deployed directory. If QmT6SgXKChuzz9nCTu8ZNtc8y7wLR3DjvH3rsEkcreiSDG is the base root, you cannot use relative paths to access other files or directories that sit on top of the tree.

You have to deploy the entire directory containing all the needed files and accessing it through that CID. The other option, as you said, would be to have links for the CIDs directly. However, I would just recommend to deploy the entire directory and accessing it at once.

Unfortunately, I can't access the links anymore.

I'm closing this in the meanwhile. Let me know if something else pops up!