ec2の上にrailsアプリケーションを立ててデプロイを試みています。
rails assets:precompile RAILS_ENV=production
を実行したのですが、下記のようなエラーが出てしまいました。
Compiling... Compilation failed: [webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - configuration.node should be one of these: false | object { __dirname?, __filename?, global? } -> Include polyfills or mocks for various node stuff. Details: * configuration.node has an unknown property 'dgram'. These properties are valid: object { __dirname?, __filename?, global? } -> Options object for node compatibility features. * configuration.node has an unknown property 'fs'. These properties are valid: object { __dirname?, __filename?, global? } -> Options object for node compatibility features. * configuration.node has an unknown property 'net'. These properties are valid: object { __dirname?, __filename?, global? } -> Options object for node compatibility features. * configuration.node has an unknown property 'tls'. These properties are valid: object { __dirname?, __filename?, global? } -> Options object for node compatibility features. * configuration.node has an unknown property 'child_process'. These properties are valid: object { __dirname?, __filename?, global? } -> Options object for node compatibility features.
package.json
1{ 2 "name": "attendance-app", 3 "private": true, 4 "dependencies": { 5 "@rails/actioncable": "^6.0.0", 6 "@rails/activestorage": "^6.0.0", 7 "@rails/ujs": "^6.0.0", 8 "@rails/webpacker": "5.4.3", 9 "turbolinks": "^5.2.0", 10 "webpack": "^5.65.0", 11 "webpack-cli": "^4.9.1" 12 }, 13 "version": "0.1.0", 14 "devDependencies": { 15 "webpack-dev-server": "3" 16 }, 17 "description": "This README would normally document whatever steps are necessary to get the application up and running.", 18 "main": "babel.config.js", 19 "directories": { 20 "lib": "lib", 21 "test": "test" 22 }, 23 "scripts": { 24 "test": "echo \"Error: no test specified\" && exit 1" 25 }, 26 "repository": { 27 "type": "git", 28 "url": "git+https://github.com/Kyoya-prog/attendance-app.git" 29 }, 30 "keywords": [], 31 "author": "", 32 "license": "ISC", 33 "bugs": { 34 "url": "https://github.com/Kyoya-prog/attendance-app/issues" 35 }, 36 "homepage": "https://github.com/Kyoya-prog/attendance-app#readme" 37} 38
ネットでも色々探しましたが、良さそうな解決策が見つかりませんでした。
解決策をご存知の方がいればご教授お願いいたします。
あなたの回答
tips
プレビュー