bulma-steps icon indicating copy to clipboard operation
bulma-steps copied to clipboard

Module build failed: Syntax Error

Open YacineGameDev opened this issue 7 years ago • 9 comments

I'm trying to integrate bulma-steps to my project so I installed the extensions via npm with npm install --save bulma-steps then I have included bulma steps to my main css file styles.css with @import 'bulma'; @import '~bulma-steps'; And when I try to build my project I have this error :

capture

YacineGameDev avatar Jun 28 '18 16:06 YacineGameDev

Be carefull the default file for import is the sass one. Try specifying .min.css in your import rule (I don't know if you hahe to specify the full path)

wikiki avatar Jun 28 '18 18:06 wikiki

yes this worked thanks, I have another question do we have to include the javascript file in index.html for the steps navigation to work? Right now, clicking on next doesn't have the correct behavior.

YacineGameDev avatar Jun 28 '18 19:06 YacineGameDev

Yes you have to include the JavaScript part too

wikiki avatar Jun 28 '18 20:06 wikiki

that's waht I'm trying to do for the past 45 minutes, I have added <script type="text/javascript" src="/node_modules/bulma-extensions/bulma-steps/dist/js/bulma-steps.min.js"></script> to my index.html but when I did so I'm getting this error in the console :

Uncaught SyntaxError: Unexpected token <

YacineGameDev avatar Jun 28 '18 20:06 YacineGameDev

Weird. Try with non minified version to see if you still having the issue ?

wikiki avatar Jun 28 '18 20:06 wikiki

yes same :confused:

YacineGameDev avatar Jun 28 '18 20:06 YacineGameDev

I managed to fix the issue however the steps still not work but now I don't have anymore the previous error. I followed this stackoverflow post https://stackoverflow.com/questions/27464168/how-to-include-scripts-located-inside-the-node-modules-folder I don't know what's exactly the problem

YacineGameDev avatar Jun 28 '18 21:06 YacineGameDev

Hi,

if you're using webpack please have a look on my gulpfile.js configuration file (in the repository)

wikiki avatar Jul 09 '18 19:07 wikiki

@import 'node_modules/bulma-steps/dist/css/bulma-steps.sass';

Add this in styles.scss after bulma.

B-PRAVEEN avatar Sep 11 '18 08:09 B-PRAVEEN