※気分を悪くさせてしまったら本当にすみません汗
色々調べては見たものの、なにが原因でherokuにデプロイできないのかがそもそもわからないです。
ただwebpackerとReactの勉強不足なのは間違いないです。汗
このような形で質問投稿して本当に恐縮なのですがどなたか解決策を教えて下さい。
質問が冗長になるのを避けるために自分が調べた限りで原因かな、と思うwebpacker.ymlとpackage.jsonだけ載せておきます。
その他で必要な箇所がありましたら迅速に対応いたしますのでよろしくお願いします。
error
1remote: Compilation failed: 2remote: ModuleNotFoundError: Module not found: Error: Can't resolve 'todos-leaf/hello' in '/tmp/build_8be719c6d6b34793b2c02bff3cbf9674/app/javascript/packs'
webpackeryml
1# Note: You must restart bin/webpack-dev-server for changes to take effect 2 3default: &default 4 source_path: app/javascript 5 source_entry_path: packs 6 public_root_path: public 7 public_output_path: packs 8 cache_path: tmp/cache/webpacker 9 check_yarn_integrity: false 10 webpack_compile_output: true 11 12 # Additional paths webpack should lookup modules 13 # ['app/assets', 'engine/foo/app/assets'] 14 resolved_paths: [] 15 16 # Reload manifest.json on all requests so we reload latest compiled packs 17 cache_manifest: false 18 19 # Extract and emit a css file 20 extract_css: false 21 22 static_assets_extensions: 23 - .jpg 24 - .jpeg 25 - .png 26 - .gif 27 - .tiff 28 - .ico 29 - .svg 30 - .eot 31 - .otf 32 - .ttf 33 - .woff 34 - .woff2 35 36 extensions: 37 - .mjs 38 - .js 39 - .sass 40 - .scss 41 - .css 42 - .module.sass 43 - .module.scss 44 - .module.css 45 - .png 46 - .svg 47 - .gif 48 - .jpeg 49 - .jpg 50 51development: 52 <<: *default 53 compile: true 54 55 # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules 56 check_yarn_integrity: true 57 58 # Reference: https://webpack.js.org/configuration/dev-server/ 59 dev_server: 60 https: false 61 host: localhost 62 port: 3035 63 public: localhost:3035 64 hmr: false 65 # Inline should be set to true if using HMR 66 inline: true 67 overlay: true 68 compress: true 69 disable_host_check: true 70 use_local_ip: false 71 quiet: false 72 pretty: false 73 headers: 74 'Access-Control-Allow-Origin': '*' 75 watch_options: 76 ignored: '**/node_modules/**' 77 78 79test: 80 <<: *default 81 compile: true 82 83 # Compile test packs to a separate directory 84 public_output_path: packs-test 85 86production: 87 <<: *default 88 89 # Production depends on precompilation of packs prior to booting for performance. 90 compile: false 91 92 # Extract and emit a css file 93 extract_css: true 94 95 # Cache manifest.json for performance 96 cache_manifest: true 97
packagejson
1{ 2 "name": "todos-leaf", 3 "private": true, 4 "dependencies": { 5 "@rails/webpacker": "4.2.2", 6 "react": "^16.12.0", 7 "react-dom": "^16.12.0" 8 }, 9 "devDependencies": { 10 "webpack-dev-server": "^3.10.1" 11 } 12} 13
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。