npm - Import an external library into a javascript file -


update

i'have purchased plugin called filepicker want use in 1 of vue.js components.

when tried import libraries way

<script>     import {filepicker} '../filepicker';     import {filepickerdrop} '../filepicker-drop'; </script> 

when run npm run dev 1st time after this, asked install library

npm install --save filepicker 

when did , tried npm run dev 2nd time, asked this

npm install --save fs net tls 

i did , run npm run dev 3rd time, asked me this

npm install --save fs 

this dependency not found: * fs in ./node_modules/request/lib/har.js

problem: keeps asking me install fs library.

these installs have updated package.json this

"dependencies": {     "filepicker": "^0.2.0",     "fs": "0.0.1-security",     "net": "^1.0.2",     "tls": "0.0.1" } 

this shows library filepicker has been installed, library fs-security it's using found.

this https://www.npmjs.com/package/fs mentions "this package name not in use." mean?

lakigeri, has suggested locally install filepicker according post. errors show above fs 1 needs installed. , don't have library install it. lakigeri suggested follow doc specifications. i'm not able import libraries, how can start work on configuration. third advise manually update dependencies in package.json file. has been updated.

i opened issue on npm github repo. still have no feedback there.

i ran search, , js lib of filepicker package not available on npmjs.com. can install lib local (check answer), or can add path of lib in package.json this. after imported it, think should nothing, if not work, have init lib doc says.

i hope helps!


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -