reactjsnpmnpm-installunpkg

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


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

"ipfs": "unpkg.com/:ipfs@0.36.3"

import IPFS from 'https://unpkg.com/ipfs@0.36.3';

it is not work.

How can i download from unpkg page this package ?


Solution

  • 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