現状のエラーメッセージです
application.scss:4 Uncaught Error: Cannot find module 'top.jpg'
at webpackMissingModule (application.scss:4)
at Object../node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./app/javascript/stylesheets/application.scss (application.scss:4)
at webpack_require (bootstrap:19)
at Object../app/javascript/stylesheets/application.scss (application.scss?4568:2)
at webpack_require (bootstrap:19)
at Module../app/javascript/packs/application.js (application.js:1)
at webpack_require (bootstrap:19)
at bootstrap:83
at bootstrap:83
現状のbootstrapのバージョンです。
{
"name": "hikari",
"private": true,
"dependencies": {
"@popperjs/core": "^2.9.3",
"@rails/actioncable": "^6.0.0-alpha",
"@rails/activestorage": "^6.0.0-alpha",
"@rails/ujs": "^6.0.0-alpha",
"@rails/webpacker": "4.3.0",
"bootstrap": "^5.1.0",
"hikari": "^1.1.0",
"jquery": "^3.6.0",
"turbolinks": "^5.2.0"
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^4.0.0"
}
}
application.scssの記述です。
@import "~bootstrap/scss/bootstrap";
@import "tweets";
試したこと
bootstrapのバージョンを下げてyarn upgradeを行いましたが挙動は変わりませんでした
あなたの回答
tips
プレビュー