简体   繁体   中英

I have a problem with videojs node-modules

so i export my project from codesandbox (it works there) to visual code and now im having problems with this ...´

Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are
configured to process this file. See https://webpack.js.org/concepts#loaders
> @charset "UTF-8";
| .vjs-modal-dialog .vjs-modal-dialog-content, .video-js .vjs-modal-dialog, .vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {
|   position: absolute;
 @ ./src/Components/Work/videojs.js 3:0-36
 @ ./src/Components/Work/Video.js
 @ ./src/Components/Work/index.js
´´´

I already install from npm all the dependencies that i have in codesandbox.
glad if anyone can answer this 

The path is wrong:

import "video.js/dist/video-js.css";

You need to give the full path:

import "/node-modules/video.js/dist/video-js.css";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM