DEV Community

Discussion on: Rails 7, Bootstrap 5 and importmaps without nodejs

Collapse
 
linediconsine profile image
Marco A.

In application.js :

import "popper"
import "bootstrap"
Enter fullscreen mode Exit fullscreen mode

give this error for me on browser :

GET http://127.0.0.1:3000/assets/popper net::ERR_ABORTED 404 (Not Found)

GET http://127.0.0.1:3000/assets/bootstrap net::ERR_ABORTED 404 (Not Found)

Enter fullscreen mode Exit fullscreen mode

full error log:

GET http://127.0.0.1:3000/assets/bootstrap net::ERR_ABORTED 404 (Not Found)
VM167 application-afa54e21226316d7c1dc5bb51d77586423db47a2adf4ce6a3fc09888e5eda505.js:2 Uncaught SyntaxError: Cannot use import statement outside a module (at VM167 application-afa54e21226316d7c1dc5bb51d77586423db47a2adf4ce6a3fc09888e5eda505.js:2:1)
application-afa54e21226316d7c1dc5bb51d77586423db47a2adf4ce6a3fc09888e5eda505.js:2 Uncaught SyntaxError: Cannot use import statement outside a module (at application-afa54e21226316d7c1dc5bb51d77586423db47a2adf4ce6a3fc09888e5eda505.js:2:1)
application-afa54e21226316d7c1dc5bb51d77586423db47a2adf4ce6a3fc09888e5eda505.js:2          GET http://127.0.0.1:3000/assets/popper net::ERR_ABORTED 404 (Not Found)
Enter fullscreen mode Exit fullscreen mode
Collapse
 
linediconsine profile image
Marco A.

I miss the

bundle add bootstrap