Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my parcel-bundler fail even on the simplest things?

So as I say in the title I'm having a simple index.html file that has a <link rel="stylesheet" href="./styles/styles.scss"> to import my styles. When I run the parcel index.html I get an error that says .nvm/versions/node/v10.16.3/lib/node_modules/parcel-bundler/src/builtins/css-loader.js: JSON5: invalid character '}' at 1:23. Here is my css in case you want to take a look at it:

body {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

I'm using the parcel-bundler without any configuration and even the first example from the get started page of the Parcel website can't run without throwing out an error about an invalid character.

If I remove the css import then the project builds. Node is on version 10.16.3 and npm is 6.9.0

I've tried using a lower node version but I'm getting the same issue.

like image 894
captain Avatar asked Oct 09 '19 12:10

captain


1 Answers

I have had like your Error but like this :

invalid Version :

/node_modules/parcel-bundler/src/builtins/css-loader.js: JSON5: invalid Version ..

so what I did .. I made uninstall to parcel then I used an older version then It has worked successfully ..

I have used [email protected] instead of [email protected]

like image 180
Mustafa Mhd Avatar answered Sep 29 '22 05:09

Mustafa Mhd