How download package from unpkg or add in dependencies unpkg package?

2k Views Asked by At

problem

I try install ipfs from unpkg site.

Project

It is React project.

But i can't download this package or install in package.json

Main page unpkg

On main page write this

unpkg is a fast, global content delivery network for everything on npm. Use it to quickly and easily load any file from any package using a URL like: unpkg.com/:package@:version/:file

Solution

I try install

  • package.json

"ipfs": "unpkg.com/:[email protected]"

  • module

import IPFS from 'https://unpkg.com/[email protected]';

it is not work.

How can i download from unpkg page this package ?

1

There are 1 best solutions below

0
On BEST ANSWER

As per documentation, you either need to install the package globally using following command

$ npm install -g ipfs

Or install ipfs-core as lighter package using following command.

$ npm install ipfs-core