就上下文而言,我使用JumpStart Rails Pro 模板作为我的 Rails 应用程序的基础。如果有帮助,可以在此处找到 JumpStart Rails 的免费版本。此外,设置模板的说明相对简单。
但是,自从我将 macOS 版本升级到 Big Sur 后,每当我启动 Rails 服务器(使用Foreman)时,我都会收到以下错误:
➜ error_demo git:(master) ✗ foreman start
20:49:32 web.1 | started with pid 29918
20:49:32 webpack.1 | started with pid 29919
20:49:35 webpack.1 | ℹ 「wds」: Project is running at http://localhost:3035/
20:49:35 webpack.1 | ℹ 「wds」: webpack output is served from /packs/
20:49:35 webpack.1 | ℹ 「wds」: Content not from webpack is served from /Users/user/Desktop/error_demo/public/packs
20:49:35 webpack.1 | ℹ 「wds」: 404s will fallback to /index.html
20:49:36 web.1 | => Booting Puma
20:49:36 web.1 | => Rails 6.1.3.2 application starting in development
20:49:36 web.1 | => Run `bin/rails server --help` for more startup options
20:49:37 web.1 | Puma starting in single mode...
20:49:37 web.1 | * Puma version: 5.3.1 (ruby 3.0.1-p64) ("Sweetnighter")
20:49:37 web.1 | * Min threads: 5
20:49:37 web.1 | * Max threads: 5
20:49:37 web.1 | * Environment: development
20:49:37 web.1 | * PID: 29918
20:49:37 web.1 | * Listening on http://127.0.0.1:5000
20:49:37 web.1 | * Listening on http://[::1]:5000
20:49:37 web.1 | Use Ctrl-C to stop
20:49:38 webpack.1 | ✖ 「wdm」: assets by chunk 4.62 MiB (id hint: vendors)
20:49:38 webpack.1 | asset js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-e3749e-e6f3843300490092fc4b.js 3.2 MiB [emitted] [immutable] (id hint: vendors)
20:49:38 webpack.1 | asset js/vendors-node_modules_core-js_modules_es_array-buffer_constructor_js-node_modules_core-js_modu-d2d2ec-77e982247c0b61dd8ef4.js 1.28 MiB [emitted] [immutable] (id hint: vendors)
20:49:38 webpack.1 | asset js/vendors-node_modules_slim-select_dist_slimselect_min_mjs-976578b546844c58e368.js 84.9 KiB [emitted] [immutable] (id hint: vendors)
20:49:38 webpack.1 | asset js/vendors-node_modules_rails_actioncable_src_index_js-58b3a0cf3fe031ba1222.chunk.js 58.8 KiB [emitted] [immutable] (id hint: vendors)
20:49:38 webpack.1 | asset js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-607252-bbdb5dcb38acb8765d1d.js 167 KiB [emitted] [immutable]
20:49:38 webpack.1 | asset js/application-6e15fc233f6b5e06a776.js 113 KiB [emitted] [immutable] (name: application)
20:49:38 webpack.1 | asset js/administrate-374b4f0af5ce005dfe57.js 19.4 KiB [emitted] [immutable] (name: administrate)
20:49:38 webpack.1 | asset js/runtime-37e0a651d48da1e59d8e.js 13.5 KiB [emitted] [immutable] (name: runtime)
20:49:38 webpack.1 | asset manifest.json 2.58 KiB [emitted]
20:49:38 webpack.1 |
20:49:38 webpack.1 | ERROR in ./app/javascript/stylesheets/base.scss
20:49:38 webpack.1 | Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
20:49:38 webpack.1 | ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
20:49:38 webpack.1 | Error: Cannot find module './_baseGet'
20:49:38 webpack.1 | Require stack:
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/lodash/get.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/util/escapeClassName.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/util/nameClass.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/plugins/animation.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/plugins/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/corePlugins.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/processTailwindFeatures.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/postcss.config.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/loaders.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/ExplorerBase.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/Explorer.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/utils.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/cjs.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/loadLoader.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/lib/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/lib/webpack-cli.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/lib/bootstrap.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/bin/cli.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/bin/webpack.js
20:49:38 webpack.1 | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
20:49:38 webpack.1 | at Function.Module._load (node:internal/modules/cjs/loader:774:27)
20:49:38 webpack.1 | at Module.require (node:internal/modules/cjs/loader:1013:19)
20:49:38 webpack.1 | at require (/Users/user/Desktop/error_demo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
20:49:38 webpack.1 | at Object.<anonymous> (/Users/user/Desktop/error_demo/node_modules/lodash/get.js:1:77)
20:49:38 webpack.1 | at Module._compile (/Users/user/Desktop/error_demo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
20:49:38 webpack.1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
20:49:38 webpack.1 | at Module.load (node:internal/modules/cjs/loader:989:32)
20:49:38 webpack.1 | at Function.Module._load (node:internal/modules/cjs/loader:829:14)
20:49:38 webpack.1 | at Module.require (node:internal/modules/cjs/loader:1013:19)
20:49:38 webpack.1 | at processResult (/Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js:690:19)
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js:792:5
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:399:11
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:251:18
20:49:38 webpack.1 | at context.callback (/Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
20:49:38 webpack.1 | at Object.loader (/Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/index.js:48:7)
20:49:38 webpack.1 |
20:49:38 webpack.1 | ERROR in ./app/javascript/stylesheets/components.scss
20:49:38 webpack.1 | Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
20:49:38 webpack.1 | ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
20:49:38 webpack.1 | Error: Cannot find module './_baseGet'
20:49:38 webpack.1 | Require stack:
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/lodash/get.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/util/escapeClassName.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/util/nameClass.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/plugins/animation.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/plugins/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/corePlugins.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/processTailwindFeatures.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/postcss.config.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/loaders.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/ExplorerBase.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/Explorer.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/utils.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/cjs.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/loadLoader.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/lib/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/lib/webpack-cli.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/lib/bootstrap.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/bin/cli.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/bin/webpack.js
20:49:38 webpack.1 | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
20:49:38 webpack.1 | at Function.Module._load (node:internal/modules/cjs/loader:774:27)
20:49:38 webpack.1 | at Module.require (node:internal/modules/cjs/loader:1013:19)
20:49:38 webpack.1 | at require (/Users/user/Desktop/error_demo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
20:49:38 webpack.1 | at Object.<anonymous> (/Users/user/Desktop/error_demo/node_modules/lodash/get.js:1:77)
20:49:38 webpack.1 | at Module._compile (/Users/user/Desktop/error_demo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
20:49:38 webpack.1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
20:49:38 webpack.1 | at Module.load (node:internal/modules/cjs/loader:989:32)
20:49:38 webpack.1 | at Function.Module._load (node:internal/modules/cjs/loader:829:14)
20:49:38 webpack.1 | at Module.require (node:internal/modules/cjs/loader:1013:19)
20:49:38 webpack.1 | at processResult (/Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js:690:19)
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js:792:5
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:399:11
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:251:18
20:49:38 webpack.1 | at context.callback (/Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
20:49:38 webpack.1 | at Object.loader (/Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/index.js:48:7)
20:49:38 webpack.1 |
20:49:38 webpack.1 | ERROR in ./app/javascript/stylesheets/utilities.scss
20:49:38 webpack.1 | Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
20:49:38 webpack.1 | ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
20:49:38 webpack.1 | Error: Cannot find module './_baseGet'
20:49:38 webpack.1 | Require stack:
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/lodash/get.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/util/escapeClassName.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/util/nameClass.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/plugins/animation.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/plugins/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/corePlugins.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/processTailwindFeatures.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/tailwindcss/lib/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/postcss.config.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/loaders.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/ExplorerBase.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/Explorer.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/cosmiconfig/dist/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/utils.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/cjs.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/loadLoader.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/lib/index.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/lib/webpack-cli.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/lib/bootstrap.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack-cli/bin/cli.js
20:49:38 webpack.1 | - /Users/user/Desktop/error_demo/node_modules/webpack/bin/webpack.js
20:49:38 webpack.1 | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
20:49:38 webpack.1 | at Function.Module._load (node:internal/modules/cjs/loader:774:27)
20:49:38 webpack.1 | at Module.require (node:internal/modules/cjs/loader:1013:19)
20:49:38 webpack.1 | at require (/Users/user/Desktop/error_demo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
20:49:38 webpack.1 | at Object.<anonymous> (/Users/user/Desktop/error_demo/node_modules/lodash/get.js:1:77)
20:49:38 webpack.1 | at Module._compile (/Users/user/Desktop/error_demo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
20:49:38 webpack.1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
20:49:38 webpack.1 | at Module.load (node:internal/modules/cjs/loader:989:32)
20:49:38 webpack.1 | at Function.Module._load (node:internal/modules/cjs/loader:829:14)
20:49:38 webpack.1 | at Module.require (node:internal/modules/cjs/loader:1013:19)
20:49:38 webpack.1 | at processResult (/Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js:690:19)
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/webpack/lib/NormalModule.js:792:5
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:399:11
20:49:38 webpack.1 | at /Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:251:18
20:49:38 webpack.1 | at context.callback (/Users/user/Desktop/error_demo/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
20:49:38 webpack.1 | at Object.loader (/Users/user/Desktop/error_demo/node_modules/postcss-loader/dist/index.js:48:7)
20:49:38 webpack.1 |
20:49:38 webpack.1 | 3 ERRORS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
20:49:38 webpack.1 | webpack 5.37.0 compiled with 6 errors in 3358 ms
20:49:38 webpack.1 | ℹ 「wdm」: Failed to compile.
在我的服务器日志中立即收到此错误后,如果我尝试将浏览器指向localhost:5000
,我会收到以下错误:
22:35:22 web.1 | Started GET "/jumpstart/?welcome=true" for ::1 at 2021-06-02 22:35:22 -0400
22:35:22 web.1 | (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
22:35:22 web.1 | Processing by Jumpstart::AdminController#show as HTML
22:35:22 web.1 | Parameters: {"welcome"=>"true"}
22:35:22 web.1 | Rendering layout lib/jumpstart/app/views/layouts/jumpstart/application.html.erb
22:35:22 web.1 | Rendering lib/jumpstart/app/views/jumpstart/admin/show.html.erb within layouts/jumpstart/application
22:35:23 web.1 | Rendered shared/_flash.html.erb (Duration: 7.3ms | Allocations: 557)
22:35:23 web.1 | Rendered lib/jumpstart/app/views/jumpstart/admin/_application.html.erb (Duration: 40.4ms | Allocations: 10342)
22:35:23 web.1 | Rendered lib/jumpstart/app/views/jumpstart/admin/_development.html.erb (Duration: 1.7ms | Allocations: 684)
...
22:35:23 web.1 | Rendered lib/jumpstart/app/views/jumpstart/admin/_email.html.erb (Duration: 1.5ms | Allocations: 996)
22:35:23 web.1 | User Load (5.4ms) SELECT "users".* FROM "users" WHERE "users"."admin" = $1 ORDER BY "users"."created_at" ASC [["admin", true]]
22:35:23 web.1 | ↳ lib/jumpstart/app/views/jumpstart/admin/_users.html.erb:12
22:35:23 web.1 | Rendered collection of lib/jumpstart/app/views/jumpstart/users/_user.html.erb [0 times] (Duration: 0.1ms | Allocations: 39)
22:35:23 web.1 | Rendered lib/jumpstart/app/views/jumpstart/admin/_users.html.erb (Duration: 11.3ms | Allocations: 2488)
22:35:23 web.1 | Rendered shared/_error_messages.html.erb (Duration: 0.8ms | Allocations: 201)
22:35:23 web.1 | Rendered lib/jumpstart/app/views/jumpstart/admin/_admin_user_modal.html.erb (Duration: 136.8ms | Allocations: 52285)
22:35:23 web.1 | Rendered lib/jumpstart/app/views/jumpstart/admin/show.html.erb within layouts/jumpstart/application (Duration: 694.0ms | Allocations: 159170)
22:35:23 web.1 | Rendered layout lib/jumpstart/app/views/layouts/jumpstart/application.html.erb (Duration: 756.7ms | Allocations: 163447)
22:35:23 web.1 | Completed 500 Internal Server Error in 810ms (ActiveRecord: 16.0ms | Allocations: 185533)
22:35:23 web.1 |
22:35:23 web.1 |
22:35:23 web.1 |
22:35:23 web.1 | ActionView::Template::Error (Webpacker can't find application.css in /Users/user/Desktop/error_demo/public/packs/manifest.json. Possible causes:
22:35:23 web.1 | 1. You want to set webpacker.yml value of compile to true for your environment
22:35:23 web.1 | unless you are using the `webpack -w` or the webpack-dev-server.
22:35:23 web.1 | 2. webpack has not yet re-run to reflect updates.
22:35:23 web.1 | 3. You have misconfigured Webpacker's config/webpacker.yml file.
22:35:23 web.1 | 4. Your webpack configuration is not creating a manifest.
22:35:23 web.1 | Your manifest contains:
22:35:23 web.1 | {
22:35:23 web.1 | "administrate.js": "/packs/js/administrate-0c8b2777d7511ed7b307.js",
22:35:23 web.1 | "application.js": "/packs/js/application-f6c3b266e783c03da3c9.js",
22:35:23 web.1 | "entrypoints": {
22:35:23 web.1 | "administrate": {
22:35:23 web.1 | "assets": {
22:35:23 web.1 | "js": [
22:35:23 web.1 | "/packs/js/runtime-37e0a651d48da1e59d8e.js",
22:35:23 web.1 | "/packs/js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-e3749e-e6f3843300490092fc4b.js",
22:35:23 web.1 | "/packs/js/vendors-node_modules_slim-select_dist_slimselect_min_mjs-976578b546844c58e368.js",
22:35:23 web.1 | "/packs/js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-607252-1b54e11a2ff72b2a34f4.js",
22:35:23 web.1 | "/packs/js/administrate-0c8b2777d7511ed7b307.js"
22:35:23 web.1 | ]
22:35:23 web.1 | }
22:35:23 web.1 | },
22:35:23 web.1 | "application": {
22:35:23 web.1 | "assets": {
22:35:23 web.1 | "js": [
22:35:23 web.1 | "/packs/js/runtime-37e0a651d48da1e59d8e.js",
22:35:23 web.1 | "/packs/js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-e3749e-e6f3843300490092fc4b.js",
22:35:23 web.1 | "/packs/js/vendors-node_modules_core-js_modules_es_array-buffer_constructor_js-node_modules_core-js_modu-d2d2ec-667d80cef65ff231f104.js",
22:35:23 web.1 | "/packs/js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-607252-1b54e11a2ff72b2a34f4.js",
22:35:23 web.1 | "/packs/js/application-f6c3b266e783c03da3c9.js"
22:35:23 web.1 | ]
22:35:23 web.1 | }
22:35:23 web.1 | }
22:35:23 web.1 | },
22:35:23 web.1 | "js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-607252-1b54e11a2ff72b2a34f4.js": "/packs/js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-607252-1b54e11a2ff72b2a34f4.js",
22:35:23 web.1 | "js/vendors-node_modules_core-js_modules_es_array-buffer_constructor_js-node_modules_core-js_modu-d2d2ec-667d80cef65ff231f104.js": "/packs/js/vendors-node_modules_core-js_modules_es_array-buffer_constructor_js-node_modules_core-js_modu-d2d2ec-667d80cef65ff231f104.js",
22:35:23 web.1 | "js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-e3749e-e6f3843300490092fc4b.js": "/packs/js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-e3749e-e6f3843300490092fc4b.js",
22:35:23 web.1 | "js/vendors-node_modules_rails_actioncable_src_index_js-58b3a0cf3fe031ba1222.chunk.js": "/packs/js/vendors-node_modules_rails_actioncable_src_index_js-58b3a0cf3fe031ba1222.chunk.js",
22:35:23 web.1 | "js/vendors-node_modules_slim-select_dist_slimselect_min_mjs-976578b546844c58e368.js": "/packs/js/vendors-node_modules_slim-select_dist_slimselect_min_mjs-976578b546844c58e368.js",
22:35:23 web.1 | "runtime.js": "/packs/js/runtime-37e0a651d48da1e59d8e.js"
22:35:23 web.1 | }
22:35:23 web.1 | ):
22:35:23 web.1 | 8: <%# All assets are defined in Webpacker app/javascripts now %>
22:35:23 web.1 | 9:
22:35:23 web.1 | 10: <%= javascript_pack_tag 'application', 'data-turbo-track': 'reload' %>
22:35:23 web.1 | 11: <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
22:35:23 web.1 | 12:
22:35:23 web.1 | 13: <%# Replace this with your FontAwesome Pro Kit code %>
22:35:23 web.1 | 14: <script src="https://kit.fontawesome.com/0e5ab6a736.js"></script>
22:35:23 web.1 |
22:35:23 web.1 | lib/jumpstart/app/views/layouts/jumpstart/application.html.erb:11
需要明确的是,这些错误发生在模板项目的干净副本中(即在我编写与我的特定应用程序有关的单行代码之前)。
这是webpacker.yml
文件。将行上的值更改cache_manifest: false
为true
没有解决问题:
这是应用程序的package.json
文件。我尝试同时添加两者lodash
,lodash.assign
但这也没有解决问题。
我尝试删除该node_modules
文件夹并运行yarn install
,随后yarn upgrade
又运行了一个bundle update
,但这并没有解决问题。我也尝试过rails webpacker:install
,rails webpacker:compile
但也没有解决问题,以及我遇到的各种 Stack Overflow 问题或 GitHub 问题中提到的任何其他建议的解决方案。当我尝试运行时bin/webpack
,我收到以下错误(类似于上面的错误输出):
➜ error_demo git:(master) ✗ bin/webpack
assets by status 3.76 MiB [cached] 5 assets
assets by path . 266 KiB
asset js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-f85cd4-cfa0e1048c9c9f107fea.js 133 KiB [emitted] [immutable]
asset js/application-62dd0838525a49a8cb7d.js 112 KiB [emitted] [immutable] (name: application)
asset js/administrate-c79e68f9e2961e924263.js 18 KiB [emitted] [immutable] (name: administrate)
asset manifest.json 2.58 KiB [emitted] [compared for emit]
Entrypoint administrate 2.57 MiB = js/runtime-c2e14aa9ceaa022d3bb8.js 13.1 KiB js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-79751a-551764d14dede90246a7.js 2.32 MiB js/vendors-node_modules_slim-select_dist_slimselect_min_mjs-976578b546844c58e368.js 84.9 KiB js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-f85cd4-cfa0e1048c9c9f107fea.js 133 KiB js/administrate-c79e68f9e2961e924263.js 18 KiB
Entrypoint application 3.86 MiB = js/runtime-c2e14aa9ceaa022d3bb8.js 13.1 KiB js/vendors-node_modules_hotwired_turbo-rails_app_javascript_turbo_index_js-node_modules_rails_ac-79751a-551764d14dede90246a7.js 2.32 MiB js/vendors-node_modules_core-js_modules_es_array-buffer_constructor_js-node_modules_core-js_modu-d2d2ec-667d80cef65ff231f104.js 1.28 MiB js/app_javascript_channels_index_js-app_javascript_controllers_index_js-app_javascript_src_actio-f85cd4-cfa0e1048c9c9f107fea.js 133 KiB js/application-62dd0838525a49a8cb7d.js 112 KiB
runtime modules 7.56 KiB 15 modules
orphan modules 443 bytes [orphan] 1 module
modules by path ./node_modules/core-js/ 346 KiB 342 modules
modules by path ./node_modules/@popperjs/core/lib/ 72.8 KiB 57 modules
modules by path ./node_modules/@stimulus/ 84.5 KiB 39 modules
modules by path ./app/javascript/ 66.8 KiB 35 modules
modules by path ./node_modules/@rails/ 97 KiB 14 modules
modules by path ./node_modules/flatpickr/dist/esm/ 99.6 KiB 8 modules
modules by path ./node_modules/@hotwired/ 93.5 KiB 4 modules
modules by path ./node_modules/stimulus/*.js 73 bytes 2 modules
modules by path ./node_modules/jstz/ 42.8 KiB
./node_modules/jstz/index.js 44 bytes [built] [code generated]
./node_modules/jstz/dist/jstz.js 42.8 KiB [built] [code generated]
10 modules
Same 3 errors mentioned above...
我让应用程序接近工作的唯一一次是当我注释掉以下行时,发现于lib/jumpstart/app/views/layouts/jumpstart/application.html.erb:11
(在错误响应中提到):
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
该应用程序能够加载,但没有应用任何样式。
我非常感谢任何建议,因为我已经坚持了几天了。如果您可能需要任何其他信息,请在下方评论。先感谢您!