Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get or find style.css #2

Closed
TBSI-Seth opened this issue Sep 1, 2021 · 2 comments
Closed

Cannot get or find style.css #2

TBSI-Seth opened this issue Sep 1, 2021 · 2 comments

Comments

@TBSI-Seth
Copy link

TBSI-Seth commented Sep 1, 2021

----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
Copy link
Author

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
Copy link
Owner

dash14 commented Sep 2, 2021

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.)

dash14 added a commit that referenced this issue Sep 7, 2021
The following code will allow importing in subpath exports supported environment.
import "v-network-graph/lib/style.css"
ref: #2, #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants