在 Shopify 应用中运行:yarn dev 时,报错:Bundler version 2.3.7 is not supported
1、在 Shopify 应用中运行:yarn dev 时,报错:Bundler version 2.3.7 is not supported。如图1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | PS E:\wwwroot\shopify-app\learn-app> yarn dev yarn run v1.22.15 $ shopify app dev <img draggable="false" role="img" class="emoji" alt=" To run this command, log in to Shopify Partners. <img draggable="false" role="img" class="emoji" alt=" Auto-open timed out. Open the login page: Log in to Shopify Partners (http://accounts.shopify.com/oauth/authorize?client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&scope=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&state=34c66755c0614e1bcedd680b643bcbf2e6fe237c653dac95dc43a7fb15e7&response_type=code&code_challenge_method=S256&code_challenge=lLJtne8D7cUPF437Ct2zttzSDSJV48mXJyuil-7GzrM) <img draggable="false" role="img" class="emoji" alt=" Using your previous dev settings: - Org: 王强 - App: learn-app - Dev store: shuijingwanwq-development.myshopify.com - Update URLs: Always To reset your default dev config, run yarn dev --reset <img draggable="false" role="img" class="emoji" alt=" <img draggable="false" role="img" class="emoji" alt=" Shareable app URL learn-app-extension-20221018 (Theme app extension) Follow the dev doc instructions (https://shopify.dev/apps/online-store/theme-app-extensions/getting-started#step-3-test-your-changes) by deploying your work as a draft <img draggable="false" role="img" class="emoji" alt=" ━━━━━━ Error ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Bundler version 2.3.7 is not supported What to try: To update to the latest version of Bundler, run gem install bundler ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ frontend | frontend | > dev frontend | > vite frontend | frontend | frontend | vite v2.9.15 dev server running at: frontend | frontend | > Network: http://192.168.56.1:56648/ frontend | > Network: http://192.168.10.1:56648/ frontend | > Network: http://192.168.89.86:56648/ frontend | > Local: http://localhost:56648/ frontend | > Network: http://172.17.176.1:56648/ frontend | frontend | ready in 1913ms. frontend | backend | > Composer\Config::disableProcessTimeout backend | > php artisan serve error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. PS E:\wwwroot\shopify-app\learn-app> |
2、要更新到最新版本的 Bundler,请运行 gem install bundler。
1 2 3 4 5 6 7 | PS E:\wwwroot\shopify-app\learn-app> gem install bundler Fetching bundler-2.3.24.gem Successfully installed bundler-2.3.24 Parsing documentation for bundler-2.3.24 Installing ri documentation for bundler-2.3.24 Done installing documentation for bundler after 0 seconds 1 gem installed |
3、再次运行:yarn dev,不再报错。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | PS E:\wwwroot\shopify-app\learn-app> yarn dev yarn run v1.22.15 $ shopify app dev <img draggable="false" role="img" class="emoji" alt=" Using your previous dev settings: - Org: 王强 - App: learn-app - Dev store: shuijingwanwq-development.myshopify.com - Update URLs: Always To reset your default dev config, run yarn dev --reset <img draggable="false" role="img" class="emoji" alt=" <img draggable="false" role="img" class="emoji" alt=" Shareable app URL learn-app-extension-20221018 (Theme app extension) Follow the dev doc instructions (https://shopify.dev/apps/online-store/theme-app-extensions/getting-started#step-3-test-your-changes) by deploying your work as a draft ⠧ Installing theme dependencies frontend | frontend | > dev frontend | > vite ⠦ Installing theme dependencies frontend | frontend | vite v2.9.15 dev server running at: frontend | frontend | > Network: http://192.168.56.1:57181/ frontend | > Network: http://192.168.10.1:57181/ frontend | > Network: http://192.168.89.86:57181/ frontend | > Local: http://localhost:57181/ frontend | > Network: http://172.17.176.1:57181/ frontend | frontend | ready in 840ms. ⠧ Installing theme dependencies backend | > Composer\Config::disableProcessTimeout ⠸ Installing theme dependencies ⠦ Installing theme dependencies <img draggable="false" role="img" class="emoji" alt=" ┏━━ Pushing theme files to App Ext. Host (287916-DESKTOP-QLPK8QM) (#133112823993) on shuijingwanwq-development.myshopify.com ┃ 100% ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (42.0s) ━━━ [Note] You cannot use gems with Shopify CLI. [LoadError] cannot load such file -- wdm They are disabled. Please don't modify the CLI locally. If you would like to contribute to the CLI project, please refer to Please add the following to your Gemfile to avoid polling for changes: gem 'wdm', '>= 0.1.0' if Gem.win_platform? ┏━━ Viewing extension… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ┃ Enable your theme app extension: ┃ ┃ Setup your theme app extension in the host theme: ┃ ┃ Preview your theme app extension: ┃ ┃ (Use Ctrl-C to stop) ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (0.0s) ━━━ |
近期评论