Closed shaxzad closed 1 year ago
Hey @shaxzad, seems like the source
command we were using inside of the sync
npm script is not compatible with your shell. Could you please retry on this branch? https://github.com/swellstores/horizon/tree/fork/fix-env-src
Thanks and sorry for the inconveniences.
Hi @AdrianRC
Thanks for the support.
It's worked on that branch.
I still facing some issues here when run the command npm run dev
@shaxzad I had the same issue on your first screenshot. So i've reinstall node as in guide via nvm - ran nvm install
command and then npm install
and everything was setup so i could ran app.
Thank you @agsmartwolf for your help!
@shaxzad were you able to fix your issue?
I'm also having this issue, it get through almost everything but fails when it reaches sync:content-blocks
Using the fork/fix-env-src
branch gets me further but it still crashes towards the end with:
[sync] [content-blocks] - Pushing Quiz model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.quiz model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Question page model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.quiz_question model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Transition page model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.quiz_transition model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Customer reviews model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.reviews model to cirqus-marketplace store.
[sync] [content-blocks] npm run sync:content-blocks exited with code 0
[sync] npm run sync exited with code 1
npm ERR! code 1
npm ERR! path /Users/holden/Code/paid-projects/cirqus-horizon
npm ERR! command failed
npm ERR! command sh -c -- husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
The logs don't give much else:
906 error command failed
907 error command sh -c -- husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
908 verbose exit 1
909 timing npm Completed in 45898ms
910 verbose code 1
When I tried to run npm run setup
I find that it seems to be npm run sync:content-blocks
which is failing with:
file:///Users/holden/Code/paid-projects/cirqus-horizon/node_modules/@swell/cli/dist/bin/swell-2acb6c0f.js:21659
throw new ArgError(
^
ArgError: option requires argument: --store
at arg (file:///Users/holden/Code/paid-projects/cirqus-horizon/node_modules/@swell/cli/dist/bin/swell-2acb6c0f.js:21659:13)
at file:///Users/holden/Code/paid-projects/cirqus-horizon/node_modules/@swell/cli/dist/bin/swell-2acb6c0f.js:29597:14
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
code: 'ARG_MISSING_REQUIRED_LONGARG'
}
I also tried deploying to Vercel as well as it seemed to complete the setup process for the models but it likewise fails:
npm ERR! code 1
--
09:44:20.524 | npm ERR! path /vercel/path0
09:44:20.526 | npm ERR! command failed
09:44:20.526 | npm ERR! command sh -c -- husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
09:44:20.527 |
09:44:20.527 | npm ERR! A complete log of this run can be found in:
09:44:20.527 | npm ERR! /vercel/.npm/_logs/2023-04-12T07_43_33_129Z-debug-0.log
09:44:20.571 | Error: Command "npm install" exited with 1
09:44:21.426 | Deployment completed
09:44:21.048 | BUILD_UTILS_SPAWN_1: Command "npm install" exited with 1
What am I doing wrong?
Any ideas?
Thanks
Hey @holden thank you for bringing this up to our attention! We’re currently to solve this issue as soon as possible as we’ve made a few updates to our system our the last couple of days that might have affected Horizon. We’ll let you know once it has been fixed.
Please run the below set of commands in the same order to get the setup working fine locally.
git clone https://github.com/swellstores/horizon.git
cd horizon
nvm install
npm install -g npm@8
Create a .env
file in the root directory with the following content:
NEXT_PUBLIC_SWELL_STORE_URL=https://STORE_ID.swell.store
NEXT_PUBLIC_SWELL_PUBLIC_KEY=
SWELL_STORE_ID=STORE_ID
SWELL_SECRET_KEY=
Now, run the below command
npm install
Please find the logs below:
user@Logeshs-MacBook-Pro-2 Desktop % git clone https://github.com/swellstores/horizon.git
Cloning into 'horizon'...
remote: Enumerating objects: 1411, done.
remote: Counting objects: 100% (644/644), done.
remote: Compressing objects: 100% (451/451), done.
remote: Total 1411 (delta 269), reused 372 (delta 181), pack-reused 767
Receiving objects: 100% (1411/1411), 17.24 MiB | 11.37 MiB/s, done.
Resolving deltas: 100% (315/315), done.
user@Logeshs-MacBook-Pro-2 Desktop %
user@Logeshs-MacBook-Pro-2 Desktop %
user@Logeshs-MacBook-Pro-2 Desktop % cd horizon
user@Logeshs-MacBook-Pro-2 horizon % nvm install
Found '/Users/user/Desktop/horizon/.nvmrc' with version <16.18.1>
v16.18.1 is already installed.
Now using node v16.18.1 (npm v8.19.4)
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon % nvm use
Found '/Users/user/Desktop/horizon/.nvmrc' with version <16.18.1>
Now using node v16.18.1 (npm v8.19.4)
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon % npm install -g npm@8
changed 16 packages, and audited 212 packages in 1s
11 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon % npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: relay-compiler@12.0.0
npm WARN Found: graphql@16.3.0
npm WARN node_modules/graphql
npm WARN graphql@"^16.3.0" from the root project
npm WARN 69 more (@graphql-codegen/cli, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^15.0.0" from relay-compiler@12.0.0
npm WARN node_modules/relay-compiler
npm WARN relay-compiler@"12.0.0" from @graphql-tools/relay-operation-optimizer@6.4.5
npm WARN node_modules/@graphql-tools/relay-operation-optimizer
npm WARN
npm WARN Conflicting peer dependency: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN peer graphql@"^15.0.0" from relay-compiler@12.0.0
npm WARN node_modules/relay-compiler
npm WARN relay-compiler@"12.0.0" from @graphql-tools/relay-operation-optimizer@6.4.5
npm WARN node_modules/@graphql-tools/relay-operation-optimizer
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: webpack-filter-warnings-plugin@1.2.1
npm WARN Found: webpack@5.70.0
npm WARN node_modules/webpack
npm WARN dev webpack@"^5.69.1" from the root project
npm WARN 24 more (@pmmmwh/react-refresh-webpack-plugin, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from webpack-filter-warnings-plugin@1.2.1
npm WARN node_modules/webpack-filter-warnings-plugin
npm WARN webpack-filter-warnings-plugin@"^1.2.1" from @storybook/builder-webpack4@6.5.10
npm WARN node_modules/@storybook/builder-webpack4
npm WARN
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from webpack-filter-warnings-plugin@1.2.1
npm WARN node_modules/webpack-filter-warnings-plugin
npm WARN webpack-filter-warnings-plugin@"^1.2.1" from @storybook/builder-webpack4@6.5.10
npm WARN node_modules/@storybook/builder-webpack4
> @swell/horizon@0.4.0 prepare
> husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
husky - Git hooks installed
> @swell/horizon@0.4.0 setup
> npm run sync && npm run graphql:generate && npm run theme:generate
> @swell/horizon@0.4.0 sync
> set -a && if [ -f .env ]; then source .env; fi && npm run sync:defaults && npm run sync:content-blocks && npm run sync:editor
> @swell/horizon@0.4.0 sync:defaults
> swell storefront settings push settings -f ./config/defaults.json --strategy "defaults" --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY
✔ Successfully updated settings to logesh-test-1 store.
> @swell/horizon@0.4.0 sync:content-blocks
> ls ./config/content/*.json | xargs -L 1 swell model push --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY --strategy "merge" --content -f
✔ Successfully pushed theme.horizon.categories_preview model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.category model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.divider model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.full_width_media model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.heading_with_text model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.memberships model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.multiple_features model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.multiple_panels model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.page model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.press_mentions_carousel model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.product model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.products_preview model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.quiz model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.quiz_question model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.quiz_transition model to logesh-test-1 store.
✔ Successfully pushed theme.horizon.reviews model to logesh-test-1 store.
> @swell/horizon@0.4.0 sync:editor
> swell storefront settings push editor -f config/editor.json --strategy "merge" --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY
✔ Successfully updated editor settings to logesh-test-1 store.
> @swell/horizon@0.4.0 graphql:generate
> graphql-codegen --config codegen.yml -r dotenv/config
✔ Parse Configuration
✔ Generate outputs
> @swell/horizon@0.4.0 theme:generate
> node -r dotenv/config ./build-utils/generate-theme.mjs
file:///Users/user/Desktop/horizon/build-utils/styles.mjs:14
Object.entries(object).forEach(([key, value]) => {
^
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at getVarsFromObject (file:///Users/user/Desktop/horizon/build-utils/styles.mjs:14:10)
at generateCssVars (file:///Users/user/Desktop/horizon/build-utils/styles.mjs:32:21)
at file:///Users/user/Desktop/horizon/build-utils/generate-theme.mjs:12:19
at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! code 1
npm ERR! path /Users/user/Desktop/horizon
npm ERR! command failed
npm ERR! command sh -c -- husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2023-04-12T11_59_58_997Z-debug-0.log
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon %
user@Logeshs-MacBook-Pro-2 horizon %
You will encounter an error in the step of theme:generate
for which our team is working on the fix and you can get it resolved at the earliest.
@ana-estrela Thanks for that. Please let me know.
Re: @logeshswell I did exactly that, following your steps exactly and trying npm install
on a fresh clone of horizon but I don't get nearly as far as you. I get stuck at sync:defaults
except if I try using the branch fix-env-src
I can get a bit further, but still not as far as you. ;-(
What can I do to get around this obstacle?
Thanks
➜ horizon git:(main) npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: relay-compiler@12.0.0
npm WARN Found: graphql@16.3.0
npm WARN node_modules/graphql
npm WARN graphql@"^16.3.0" from the root project
npm WARN 69 more (@graphql-codegen/cli, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^15.0.0" from relay-compiler@12.0.0
npm WARN node_modules/relay-compiler
npm WARN relay-compiler@"12.0.0" from @graphql-tools/relay-operation-optimizer@6.4.5
npm WARN node_modules/@graphql-tools/relay-operation-optimizer
npm WARN
npm WARN Conflicting peer dependency: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN peer graphql@"^15.0.0" from relay-compiler@12.0.0
npm WARN node_modules/relay-compiler
npm WARN relay-compiler@"12.0.0" from @graphql-tools/relay-operation-optimizer@6.4.5
npm WARN node_modules/@graphql-tools/relay-operation-optimizer
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: webpack-filter-warnings-plugin@1.2.1
npm WARN Found: webpack@5.70.0
npm WARN node_modules/webpack
npm WARN dev webpack@"^5.69.1" from the root project
npm WARN 24 more (@pmmmwh/react-refresh-webpack-plugin, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from webpack-filter-warnings-plugin@1.2.1
npm WARN node_modules/webpack-filter-warnings-plugin
npm WARN webpack-filter-warnings-plugin@"^1.2.1" from @storybook/builder-webpack4@6.5.10
npm WARN node_modules/@storybook/builder-webpack4
npm WARN
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from webpack-filter-warnings-plugin@1.2.1
npm WARN node_modules/webpack-filter-warnings-plugin
npm WARN webpack-filter-warnings-plugin@"^1.2.1" from @storybook/builder-webpack4@6.5.10
npm WARN node_modules/@storybook/builder-webpack4
npm WARN deprecated @types/tailwindcss@3.1.0: This is a stub types definition. tailwindcss provides its own type definitions, so you do not need this installed.
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated core-js-pure@3.21.1: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.
npm WARN deprecated core-js@3.21.1: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
> @swell/horizon@0.4.0 prepare
> husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
husky - Git hooks installed
> @swell/horizon@0.4.0 setup
> npm run sync && npm run graphql:generate && npm run theme:generate
> @swell/horizon@0.4.0 sync
> set -a && if [ -f .env ]; then source .env; fi && npm run sync:defaults && npm run sync:content-blocks && npm run sync:editor
> @swell/horizon@0.4.0 sync:defaults
> swell storefront settings push settings -f ./config/defaults.json --strategy "defaults" --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY
✖ Cannot convert undefined or null to object
npm ERR! code 1
npm ERR! path /Users/holdenthomas/Code/paid-projects/horizon
npm ERR! command failed
npm ERR! command sh -c -- husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/holdenthomas/.npm/_logs/2023-04-12T12_36_50_905Z-debug-0.log
@holden One of the reasons for your failure might be due to the outdated fork that you are using, because a few additions and deletions were introduced in the recent commit. @AdrianRC Can you reverse merge your fork with the latest main branch?
In the mean time, Can you apply this commit in your horizon clone and try again? It should work.
I tried everything using the current vanilla main branch. I only tried the other branch I mentioned because main
it wasn't working.
The changes to package.json from your commit seemed to work a bit further but I got errors on npm run theme:generate
(which I guess is the same as you) but also on sync:content-blocks
?
But closer than before!
➜ horizon git:(main) npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: relay-compiler@12.0.0
npm WARN Found: graphql@16.3.0
npm WARN node_modules/graphql
npm WARN graphql@"^16.3.0" from the root project
npm WARN 66 more (@graphql-codegen/introspection, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^15.0.0" from relay-compiler@12.0.0
npm WARN node_modules/relay-compiler
npm WARN relay-compiler@"12.0.0" from @graphql-tools/relay-operation-optimizer@6.4.5
npm WARN node_modules/@graphql-tools/relay-operation-optimizer
npm WARN
npm WARN Conflicting peer dependency: graphql@15.8.0
npm WARN node_modules/graphql
npm WARN peer graphql@"^15.0.0" from relay-compiler@12.0.0
npm WARN node_modules/relay-compiler
npm WARN relay-compiler@"12.0.0" from @graphql-tools/relay-operation-optimizer@6.4.5
npm WARN node_modules/@graphql-tools/relay-operation-optimizer
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: webpack-filter-warnings-plugin@1.2.1
npm WARN Found: webpack@5.70.0
npm WARN node_modules/webpack
npm WARN dev webpack@"^5.69.1" from the root project
npm WARN 24 more (@pmmmwh/react-refresh-webpack-plugin, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from webpack-filter-warnings-plugin@1.2.1
npm WARN node_modules/webpack-filter-warnings-plugin
npm WARN webpack-filter-warnings-plugin@"^1.2.1" from @storybook/builder-webpack4@6.5.10
npm WARN node_modules/@storybook/builder-webpack4
npm WARN
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from webpack-filter-warnings-plugin@1.2.1
npm WARN node_modules/webpack-filter-warnings-plugin
npm WARN webpack-filter-warnings-plugin@"^1.2.1" from @storybook/builder-webpack4@6.5.10
npm WARN node_modules/@storybook/builder-webpack4
> @swell/horizon@0.4.0 prepare
> husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
husky - Git hooks installed
> @swell/horizon@0.4.0 setup
> concurrently "npm:sync" "npm:graphql:generate" "npm:theme:generate"
[sync]
[sync] > @swell/horizon@0.4.0 sync
[sync] > dotenv concurrently "npm:sync:*"
[sync]
[graphql:generate]
[graphql:generate] > @swell/horizon@0.4.0 graphql:generate
[graphql:generate] > graphql-codegen --config codegen.yml -r dotenv/config
[graphql:generate]
[theme:generate]
[theme:generate] > @swell/horizon@0.4.0 theme:generate
[theme:generate] > node -r dotenv/config ./build-utils/generate-theme.mjs
[theme:generate]
[sync] [content-blocks]
[sync] [content-blocks] > @swell/horizon@0.4.0 sync:content-blocks
[sync] [content-blocks] > ls ./config/content/*.json | xargs -L 1 swell model push --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY --strategy "merge" --content -f
[sync] [content-blocks]
[sync] [defaults]
[sync] [defaults] > @swell/horizon@0.4.0 sync:defaults
[sync] [defaults] > swell storefront settings push settings -f ./config/defaults.json --strategy "defaults" --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY
[sync] [defaults]
[sync] [editor]
[sync] [editor] > @swell/horizon@0.4.0 sync:editor
[sync] [editor] > swell storefront settings push editor -f config/editor.json --strategy "merge" --store $SWELL_STORE_ID --secret-key $SWELL_SECRET_KEY
[sync] [editor]
[sync] [content-blocks] - Pushing Categories Preview model.
[sync] [editor] - Pushing editor settings
[sync] [defaults] - Pushing settings
[graphql:generate] [15:12:09] Parse configuration [started]
[graphql:generate] [15:12:09] Parse configuration [completed]
[graphql:generate] [15:12:09] Generate outputs [started]
[graphql:generate] [15:12:09] Generate ./graphql.schema.json [started]
[graphql:generate] [15:12:09] Generate lib/graphql/generated/sdk.ts [started]
[graphql:generate] [15:12:09] Load GraphQL schemas [started]
[graphql:generate] [15:12:09] Load GraphQL schemas [started]
[sync] [defaults] ✖ Cannot convert undefined or null to object
[sync] [defaults] npm run sync:defaults exited with code 1
[graphql:generate] [15:12:10] Load GraphQL schemas [completed]
[graphql:generate] [15:12:10] Load GraphQL schemas [completed]
[graphql:generate] [15:12:10] Load GraphQL documents [started]
[graphql:generate] [15:12:10] Load GraphQL documents [started]
[graphql:generate] [15:12:10] Load GraphQL documents [completed]
[graphql:generate] [15:12:10] Load GraphQL documents [completed]
[graphql:generate] [15:12:10] Generate [started]
[graphql:generate] [15:12:10] Generate [started]
[graphql:generate] [15:12:10] Generate [completed]
[graphql:generate] [15:12:10] Generate [completed]
[graphql:generate] [15:12:10] Generate ./graphql.schema.json [completed]
[graphql:generate] [15:12:10] Generate lib/graphql/generated/sdk.ts [completed]
[graphql:generate] [15:12:10] Generate outputs [completed]
[graphql:generate] npm run graphql:generate exited with code 0
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.categories_preview model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Category list page model.
[theme:generate] file:///Users/holdenthomas/Code/paid-projects/horizon/build-utils/styles.mjs:14
[theme:generate] Object.entries(object).forEach(([key, value]) => {
[theme:generate] ^
[theme:generate]
[theme:generate] TypeError: Cannot convert undefined or null to object
[theme:generate] at Function.entries (<anonymous>)
[theme:generate] at getVarsFromObject (file:///Users/holdenthomas/Code/paid-projects/horizon/build-utils/styles.mjs:14:10)
[theme:generate] at generateCssVars (file:///Users/holdenthomas/Code/paid-projects/horizon/build-utils/styles.mjs:32:21)
[theme:generate] at file:///Users/holdenthomas/Code/paid-projects/horizon/build-utils/generate-theme.mjs:12:19
[theme:generate] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[theme:generate] npm run theme:generate exited with code 1
[sync] [editor] ✔ Successfully updated editor settings to cirqus-marketplace store.
[sync] [editor] npm run sync:editor exited with code 0
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.category model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Divider model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.divider model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Full width media model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.full_width_media model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Heading with text model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.heading_with_text model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Memberships model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.memberships model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Multiple features model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.multiple_features model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Multiple panels model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.multiple_panels model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Page model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.page model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Press mentions carousel model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.press_mentions_carousel model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Product detail page model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.product model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Products preview model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.products_preview model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Quiz model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.quiz model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Question page model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.quiz_question model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Transition page model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.quiz_transition model to cirqus-marketplace store.
[sync] [content-blocks] - Pushing Customer reviews model.
[sync] [content-blocks] ✔ Successfully pushed theme.horizon.reviews model to cirqus-marketplace store.
[sync] [content-blocks] npm run sync:content-blocks exited with code 0
[sync] npm run sync exited with code 1
npm ERR! code 1
npm ERR! path /Users/holdenthomas/Code/paid-projects/horizon
npm ERR! command failed
npm ERR! command sh -c -- husky install && if [ -f codegen.yml ] && [ -f build-utils/generate-theme.mjs ]; then npm run setup; fi
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/holdenthomas/.npm/_logs/2023-04-12T13_11_49_317Z-debug-0.log
No, as you can see npm run sync:content-blocks exited with code 0
which means that it is successfully executed and exited.
While npm run theme:generate exited with code 1
is excepted until the fix is rolled out.
Ah, ok cool. So I'm all good to go, once the fix is ready, thanks for that.
just keeping myself in the loop here (so i get updated on the fix too)
Hi, just curious about an update. Has this issue been resolved yet? Thanks
@holden @stoqe We are almost very close to rollout the fix in production. I will keep you posted if it's deployed.
Have you guys managed to plug the hole? ;-)
following
so isnt Swell trying to sunset or running short of resources for some extra like this project? I signed up for swell and canceled on the next day as soon as I found out that they are not really updating repos for frontends. (origin already sunset)
The themes themselves are not sunsetted, but the Swell hosting system is not available for new users. There are just better ways to host it.
We are actively working on a new CLI version to solve the default configuration problem, which will include the ability to enable the theme editor.
ok I see, so you meant you used to have a hosting solution before?
https://developers.swell.is/storefronts/origin
I hope that you will fix the problem (Cannot convert undefined or null to object
in running npm run install
) soon so that we can get started.
The themes themselves are not sunsetted, but the Swell hosting system is not available for new users. There are just better ways to host it.
We are actively working on a new CLI version to solve the default configuration problem, which will include the ability to enable the theme editor.
This makes sense.
Can we get a run down of how it is going to work? Eg Will the theme editor will still work as it did before? Will there still be a live preview even if it's not going to best hosted or just we just check these changes in locally in development, etc?
When can we expect the new version to be rolled out?
Thanks again
The theme editor will work as it did, and live-preview will work for apps that support it like Origin and Horizon. You can trigger builds manually from another system, and soon we will introduce a way to trigger an external publish webhook from the editor.
We found that a lot of people were having trouble with the hosted system (our fault) while developers generally preferred to host on other systems any way. We have limited resources, and this shift was necessary to make sure we could dedicate efforts to larger issues.
Most of the issues mentioned in the forum are caused by a missing configuration. We're going to release a new CLI version that should solve this early next week.
@holden Your store (cirqus-marketplace) should be working fine now as I fixed the horizon storefront configurations.
@stoqe @shaxzad @unknownsouls @codeclouds-team @shumiyao Could you please share your store-id so that I can fix the horizon theme configurations in your stores in the meantime of rolling out the fix?
@logeshswell
Thank you. mine is sweet-morango
Note: I tried the fix/swell-cli-sdv2
branch yesterday, ended up with error about "SwellCategory". Would it be a problem?
@shumiyao Your storefront (sweet-morango) should work fine as expected now.
@logeshswell Thank you! It is now working!
Procedures:
fix/swell-cli-sdv2
branch. (Added SWELL_STOREFRONT_ID
to the .env file)I'm having this problem with fix/swell-cli-sdv2 branch: Generate outputs ❯ Generate to ./graphql.schema.json ✖ Failed to load schema from https://amazon-deals.swell.store/graphql: Could not obtain introspection result, received the following as response; { error: { code: "AUTHENTICATION", message: "You must authenticate with your public key. Also, make sure withCredentials is enabled fo… GraphQLError: Could not obtain introspection result, received the following as response; { error: { code: "AUTHENTICATION", message: "You must authenticate with your public key. Also, make sure withCredentials is enabled fo… at createGraphQLError (/var/www/html/swell/horizon/node_modules/@graphql-tools/wrap/node_modules/@graphql-tools/utils/cjs/errors.js:9:… at getSchemaFromIntrospection (/var/www/html/swell/horizon/node_modules/@graphql-tools/wrap/cjs/introspect.js:21:42) at /var/www/html/swell/horizon/node_modules/@graphql-tools/wrap/cjs/introspect.js:36:32 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async UrlLoader.load (/var/www/html/swell/horizon/node_modules/@graphql-tools/url-loader/cjs/index.js:211:29) at async /var/www/html/swell/horizon/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:17:39 at async Promise.all (index 5) at async loadFile (/var/www/html/swell/horizon/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:15:9) at async /var/www/html/swell/horizon/node_modules/@graphql-tools/load/cjs/load-typedefs/collect-sources.js:229:25 GraphQL Code Generator supports:
it semms horizon dosen't generate lib/graphql/generated/sdk.ts please help
@racsou As above: Follow these steps, worked for me
Switch to fix/swell-cli-sdv2 branch. (Added SWELL_STOREFRONT_ID to the .env file) npm install npm run build npm run start Server accessible at http://localhost:3000/
Here is how: Clone the main horizon theme : git clone [URL of the repo] , after it is loaded then switch to swell-cli-sdv2 branch (git checkout swell-cli-sdv2) npm install npm run build npm run start Server accessible at http://localhost:3000/
Main thing to note is that the switch requires the "SWELL_STOREFRONT_ID" added to the .env you created when you installed the main theme. All info is in your swell account.
Your .env will look something like this:
NEXT_PUBLIC_SWELL_STORE_URL=https://xyzswell.store NEXT_PUBLIC_SWELL_PUBLIC_KEY=pk_xyz SWELL_STORE_ID=xyz SWELL_SECRET_KEY=xyz SWELL_STOREFRONT_ID=xyz NEXT_PUBLIC_SWELL_EDITOR=true
The latest version of Horizon now includes fixes to a lot of the issues mentioned in this thread. Please pull the latest changes and run npm install
, you'll also have to create a SWELL_STOREFRONT_ID
env var. More info can be found here.
@stoqe @shaxzad @unknownsouls @codeclouds-team @shumiyao Could you please share your store-id so that I can fix the horizon theme configurations in your stores in the meantime of rolling out the fix?
SWELL_STOREFRONT_ID
to my .env file and i can't see the previously mentioned fix/swell-cli-sdv2
branch, so i'm guessing i'm the branch i'm using is the latest@fucha-co Can you help me with the error logs?
Try to setup this code base on my local machine also try with the GitHub online codebase the issue is the same.
Any one can help me?