'I want to import bootstrap js and jquery js file in astro js

I tried ES imports statements and normal script tag to import the required JS file and CSS file for bootstrap in astro js project

I am getting this Issue.

Error: The following dependencies are imported but could not be resolved:

js/jquery-3.4.1.min.js (imported by /media/****li/hdd/***ed-astro/src/layouts/main.astro) js/bootstrap.js (imported by /media/****li/hdd/***ed-astro/src/layouts/main.astro) js/custom.js (imported by /media/****li/hdd/***ed-astro/src/layouts/main.astro)

Are they installed?



Solution 1:[1]

Got it, in the main layout file - I had to rectify the file path

From

<script src="js/custom.js"></script>

TO

<script src="assets/js/custom.js"></script>

same for all CSS file ..

all these assets were places in the public folder.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Abdeali Chandanwala