dash14 / v-network-graph

An interactive network graph visualization component for Vue 3
https://dash14.github.io/v-network-graph/
MIT License
515 stars 44 forks source link

Cannot get or find style.css #2

Closed TBSI-Seth closed 3 years ago

TBSI-Seth commented 3 years ago

----EDIT---- I found the CSS file in the vue node-modules.... The css was located in the lib folder.... I fixed this by altering the import statement to direct to the lib folder.... import "v-network-graph/**lib**/style.css"

---ORIGINAL----

the npm install command doesn't pull the style.css file. Likewise, I'm getting an error when trying to pull or even find the style.css file. Where can I find the correct style.css file, should be included in the Repo?

I ran the following npm command successfully. npm i v-network-graph

I have added the following import and use statements

import VNetworkGraph from "v-network-graph"
import "v-network-graph/style.css"
Vue.use(VNetworkGraph)

After running my vue app, I get the following error:

This dependency was not found:

* v-network-graph/style.css in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save v-network-graph/style.css
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'

I run the suggested command.... npm install --save v-network-graph/style.css

And get the following error

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/v-network-graph/style.css.git
npm ERR! 
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Seth Klingbeil\AppData\Roaming\npm-cache\_logs\2021-09-01T19_38_00_919Z-debug.log
TBSI-Seth commented 3 years ago

I found the CSS file in the vue node-modules.... The css was located in the lib folder.... I fixed this by altering the import statement to direct to the lib folder.... import "v-network-graph/**lib**/style.css"

dash14 commented 3 years ago

Hi @TBSI-Seth,

Thank you for reporting the error and the solution.

Unfortunately, I have not been able to reproduce the problem. In the package.json, I have specified the following mapping so that it can be loaded with import "v-network-graph/style.css".

  "exports": {
    ...
    ". /style.css": ". /lib/style.css"
  },

Something in your environment may not support this "subpath exports".

If importing "v-network-graph/lib/style.css" fixes the problem, you can use it as is. However, please note that if an environment supports the above "subpath exports", an error will probably occur. (This is because the access is to a file path which has not been exported.)