I get SyntaxError: Unexpected identifier on CSS import.
In my Main.js I've CSS import:
import "./Main.css";
with comented out above line it fails on CSS import in another JS file.
Error:
babel-node src/sitemap-builder.js
/home/marcin/workspace/barbershop/src/components/Main.css:1
#main {
^^^^^
SyntaxError: Unexpected identifier
at wrapSafe (internal/modules/cjs/loader.js:988:16)
at Module._compile (internal/modules/cjs/loader.js:1036:27)
at Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Object.newLoader [as .js] (/home/marcin/workspace/barbershop/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/marcin/workspace/barbershop/src/components/Main.js:7:1)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! barber@1.0.0 sitemap: `babel-node src/sitemap-builder.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the barber@1.0.0 sitemap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/marcin/.npm/_logs/2021-09-11T09_19_27_683Z-debug.log
I get
SyntaxError: Unexpected identifier
on CSS import.In my
Main.js
I've CSS import:import "./Main.css";
with comented out above line it fails on CSS import in another JS file.
Error:
my
.babelrc
:Router:
Main.js
is class compoment (export default class Main extends Component {
)My depenedecies: