-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Recent updates give me 'TypeError: config.plugins.map is not a function', crash #1734
Comments
Got it as well today on Windows 11. I updated every packages I had in my project:
and the error message disappeared |
Hi, got same issue recently, but for deploy script. Running link to forum, where i find it: https://community.shopify.com/c/hydrogen-headless-and-storefront/hydrogen-cli-error-after-upgrading-from-2023-10-4-to-2024-01-0/m-p/2417620 |
thank you @kuschAlexander , unfortunately that didn't do it for me :/ |
This bug seems to be caused by a dependency of I checked the currently latest released version 3.54.4 and it has got an update: Now I think
Then run |
I'm going to move this report over to the hydrogen project's repo. That workaround seems sound. |
@shauns well it was not on a hydrogen project in my case |
@aurelienbobenrieth Its hard to be sure without seeing what your versions were prior to setting them. but what you set them to is what we'd expect -- CLI & app to be the same version for instance. If they weren't then totally possible to have an incompatibility there. |
Wonderful! Thanks Michell for the update
…On Thu, Feb 8, 2024 at 11:14 AM Michelle Chen ***@***.***> wrote:
Thanks for raising this issue, we are addressing it in #1741
<#1741> which aim to be release
March 1, 2024.
—
Reply to this email directly, view it on GitHub
<#1734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5B43ZBEJ6KRMKZ64MIGWATYST2XFAVCNFSM6AAAAABC5TDWQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGQ3DINBYGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
same issue on the Sanity Demo Commerce repo. tried @christiankozalla solution but unfortunately no luck using
hope this gets addressed soon. is one one able to launch a new hydrogen store for the time being then? |
Hi @jonrrivera, the fix should work. "overrides" is a "resolutions": {
"@shopify/cli-kit": "^3.54.4"
} You can also delete node_modules before a new fresh install. |
@fcisio thank you! might have also been an issue that I'm using Bun. Even tho it mentions resolving resolutions similar to npm / yarn in this Sanity Demo Commerce repo, I'm confused as to where to add the
since it only |
@jonrrivera ahhhh Bun... I was super excited about it but ended up not using it day to day, because it struggles with overrides/resolutions by design. This may be outdated by now, but the only way to achieve dependencies overrides is via the import statement themselves (which means, there is nothing you can do about node_modules). So I think the answer is that Bun is not stable enough at this point in time to handle this use case. Now for the second part of your question, the snippet goes in your "dependencies": {},
"devDependencies": {},
"overrides": {
"@shopify/cli-kit": "^3.54.4"
} You are right when you say |
really appreciate the help @fcisio ! doing this and using npm for it back and running for me :) |
After applying this workaround, I started getting this error message when I ran
The fix for this was running |
@frandiox I'm still experiencing this issue even after the update. I manually updated: But when i update
Also, tried automatic updates with |
Same. |
The update is not released yet. Please keep |
Checked my project local
|
The fix is now released. Please |
@frandiox Hey, I know this issue has been closed but i was wondering if you could help diagnose why im getting a different set of errors, i was running into the same Some context, I created this project using an earlier version sanity-hydrogen-demo, im upgrading my project to match the version that they are using, so im not using the latest version of hydrogen ✘ [ERROR] Could not resolve "http"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:3:21:
3 │ const http = require('http');
╵ ~~~~~~
The package "http" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "https"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:4:22:
4 │ const https = require('https');
╵ ~~~~~~~
The package "https" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "zlib"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:5:21:
5 │ const zlib = require('zlib');
╵ ~~~~~~
The package "zlib" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "fs"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:6:19:
6 │ const fs = require('fs');
╵ ~~~~
The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "stream"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:10:23:
10 │ const Stream = require('stream');
╵ ~~~~~~~~
The package "stream" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "crypto"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:15:23:
15 │ const crypto = require('crypto');
╵ ~~~~~~~~
The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "url"
node_modules/@remix-run/web-fetch/dist/lib.node.cjs:17:20:
17 │ const url = require('url');
╵ ~~~~~
The package "url" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "crypto"
node_modules/cookie-signature/index.js:5:21:
5 │ var crypto = require('crypto');
╵ ~~~~~~~~
The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "stream"
node_modules/stream-slice/index.js:3:24:
3 │ var Transform = require('stream').Transform;
╵ ~~~~~~~~
The package "stream" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. here is why my package.json looks like {
"dependencies": {
"@headlessui/react": "^1.7.15",
"@portabletext/react": "^3.0.4",
"@remix-run/react": "^2.4.0",
"@sanity/image-url": "^1.0.2",
"@sanity/mutator": "^3.14.1",
"@sanity/types": "^3.14.1",
"@shopify/hydrogen": "~2023.10.2",
"@shopify/remix-oxygen": "^2.0.2",
"@tippyjs/react": "^4.2.6",
"clsx": "^1.2.1",
"embla-carousel-react": "^7.1.0",
"eslist": "^1.0.0-beta.1",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
"hydrogen-sanity": "^3.3.0",
"isbot": "^3.6.12",
"lodash.filter": "^4.6.0",
"pluralize-esm": "^9.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intersection-observer": "^9.4.3",
"react-social-media-embed": "^2.3.5",
"tiny-invariant": "^1.3.1",
"@hookform/resolvers": "^2.9.7",
"@klevu/core": "^1.9.0",
"@sanity/asset-utils": "^1.3.0",
"@sanity/block-content-to-react": "^3.0.0",
"@sanity/client": "^3.3.2",
"@sanity/vision": "^3.2.4",
"@tailwindcss/aspect-ratio": "^0.4.2",
"class-variance-authority": "^0.7.0",
"crypto-js": "^4.2.0",
"embla-carousel-autoplay": "^7.0.5",
"jwt-decode": "^4.0.0",
"react-icons": "^4.12.0",
"react-lazy-media": "^0.3.1",
"react-router-dom": "^6.4.2",
"react-slick": "^0.30.1",
"react-tabs": "^5.1.0",
"snakecase-keys": "^5.5.0",
"use-react-router-breadcrumbs": "^4.0.0",
"usehooks-ts": "^2.13.0",
"yet-another-react-lightbox": "^3.12.0"
},
"devDependencies": {
"@remix-run/dev": "^2.4.0",
"@shopify/cli": "3.52.0",
"@shopify/cli-hydrogen": "7.1.0",
"@shopify/oxygen-workers-types": "^3.17.2",
"@shopify/prettier-config": "^1.1.2",
"@types/eslint": "^8.37.0",
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
"autoprefixer": "^10.4.14",
"eslint": "^8.55.0",
"eslint-plugin-hydrogen": "0.12.3",
"eslint-plugin-simple-import-sort": "^10.0.0",
"postcss": "^8.4.22",
"prettier": "^3.1.1",
"prettier-plugin-tailwindcss": "^0.5.9",
"tailwind-merge": "^2.1.0",
"tailwindcss": "^3.3.2",
"typescript": "^5.3.3",
"@types/crypto-js": "^4.2.1",
"@types/react-slick": "^0.23.13"
},
"engines": {
"node": ">=18.0.0"
}
} |
I'm still seeing this issue, here's my package.json:
I just ran a hydrogen update. The workaround with the override with Also I get a new error at runtime with the override: And now downgrading Node doesn't fix that issue anymore. I ended up just downgrading everything back to where it was before the upgrade and downgrading Node, and now that config.plugins issue is persisting even though the packages are back to the old ones. |
So it turns out that override points to the wrong location for the GraphQL schema file, for the version of Hydrogen that I'm running. After all these errors I've just given up on the upgrade, here's my working package.json with Node v20.10.0:
|
Please confirm that you have:
In which of these areas are you experiencing a problem?
App, Hydrogen custom storefront
Expected behavior
npm run dev
should launch app locally without error.Actual behavior
App doesn't launch locally, get this error in server console:
│ config.plugins.map is not a function
│ To investigate the issue, examine this stack trace:
│ at registerCleanBugsnagErrorsFromWithinPlugins (
/node_modules/@shopify/cli-hydrogen/node_modules/@shopify/cli-kit/dist/public/node/error-handler.js:137)/node_modules/@shopify/cli-hydrogen/node_modules/@shopify/cli-kit/dist/public/node/base-command.js:29)│ at init (
│ at async runCLI (
/node_modules/@shopify/cli-kit/dist/public/node/cli.js:68)/node_modules/@shopify/cli/dist/index.js:34)│ at async runShopifyCLI (
Verbose output
Reproduction steps
Operating System
Mac OS Sonoma 14.3
Shopify CLI version (check your project's
package.json
if you're not sure)"^3.55.3"
Shell
zsh
Node version (run
node -v
if you're not sure)v18.17.1
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: