These are chat archives for reactioncommerce/reaction

15th
Mar 2019
adriensh
@adrienshen
Mar 15 09:55

I'm trying to run the Starter-kit without using docker. Docker slows down css loading, development experience by a lot. Can anyone help? For ref: https://medium.com/canal-tech/why-using-docker-in-your-local-dev-environment-is-probably-not-a-great-idea-3836c6823d60

When I just try to run npm run dev, there's some errors regarding environmental variables that didn't exist when running with docker.

adriensh
@adrienshen
Mar 15 10:04
 Missing environment variables:
    CANONICAL_URL: undefined
    EXTERNAL_GRAPHQL_URL: undefined
    INTERNAL_GRAPHQL_URL: undefined
    OAUTH2_AUTH_URL: undefined
    OAUTH2_CLIENT_ID: undefined
    OAUTH2_CLIENT_SECRET: undefined
    OAUTH2_IDP_HOST_URL: undefined
    OAUTH2_REDIRECT_URL: undefined
    OAUTH2_TOKEN_URL: undefined
    SESSION_SECRET: undefined
So the issue is I need to connect the starterkit to the reaction-meteor app running in docker. But I don't want to run the starterkit itself in docker because styling changes are slow.
Here's my .env, did not change anything
CANONICAL_URL=http://localhost:4000
ENABLE_SPA_ROUTING=true
EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql-alpha
INTERNAL_GRAPHQL_URL=http://reaction.api.reaction.localhost:3000/graphql-alpha
NODE_ENV=development
OAUTH2_ADMIN_PORT=4445
OAUTH2_AUTH_URL=http://localhost:4444/oauth2/auth
OAUTH2_CLIENT_ID=reaction-next-starterkit
OAUTH2_CLIENT_SECRET=CHANGEME
OAUTH2_HOST=hydra.auth.reaction.localhost
OAUTH2_IDP_HOST_URL=http://reaction.api.reaction.localhost:3000/
OAUTH2_REDIRECT_URL=http://localhost:4000/callback
OAUTH2_TOKEN_URL=http://hydra.auth.reaction.localhost:4444/oauth2/token
PORT=4000
SEGMENT_ANALYTICS_SKIP_MINIMIZE=true
SEGMENT_ANALYTICS_WRITE_KEY=ENTER_KEY_HERE
SESSION_MAX_AGE_MS=2592000000
SESSION_SECRET=CHANGEME
STRIPE_PUBLIC_API_KEY=ENTER_STRIPE_PUBLIC_KEY_HERE
Dileepa
@dileepab
Mar 15 10:10

@janus-reith

this is the error

[GraphQL error]: Message: Variable "$input" got invalid value { order: { cartId: "cmVhY3Rpb24vY2FydDpwTmtSaEJXWTJkQW05TkpZNg==", currencyCode: "LKR", email: "bmdbalasuriya@gmail.com", fulfillmentGroups: [{ data: { shippingAddress: { address1: "460/2, Temple road, Bingiriya", address2: null, city: "Kurunegala", company: null, country: "LK", fullName: "Dileepa Balasuriya", isBillingDefault: false, isCommercial: true, isShippingDefault: false, phone: "702694270", postal: "60450", region: "Choose One..." } }, items: [{ addedAt: "2019-03-13T13:20:22.304Z", price: 100, productConfiguration: { productId: "cmVhY3Rpb24vcHJvZHVjdDpCQ1RNWjZIVHhGU3BwSkVTaw==", productVariantId: "cmVhY3Rpb24vcHJvZHVjdDpRalh1bW9DZ2hGODdkNWdONA==" }, quantity: 1 }], selectedFulfillmentMethodId: "cmVhY3Rpb24vZnVsZmlsbG1lbnRNZXRob2Q6Nm55MzdTTHhrYUFOMnpvbUw=", shopId: "cmVhY3Rpb24vc2hvcDpKOEJocTN1VHRkZ3daeDNyeg==", totalPrice: 100, type: "shipping" }], shopId: "cmVhY3Rpb24vc2hvcDpKOEJocTN1VHRkZ3daeDNyeg==" }, payments: [{ amount: 100, billingAddress: { address1: "460/2, Temple road, Bingiriya", address2: null, city: "Kurunegala", company: null, country: "LK", fullName: "Dileepa Balasuriya", isBillingDefault: false, isCommercial: true, isShippingDefault: false, phone: "702694270", postal: "60450", region: "Choose One..." }, method: "cod" }] }; Expected type PaymentMethodName at value.payments[0].method., Location: [{"line":1,"column":21}], Path: undefined

adriensh
@adrienshen
Mar 15 10:38
Alright, I figure out the answer to my own question. I just run npm run dev with environmental variables:
    "dev": "CANONICAL_URL=http://localhost:4000 EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql-alpha INTERNAL_GRAPHQL_URL=http://localhost:3000/graphql-alpha NODE_ENV=development OAUTH2_ADMIN_PORT=4445 OAUTH2_AUTH_URL=http://localhost:4444/oauth2/auth OAUTH2_CLIENT_ID=reaction-next-starterkit OAUTH2_CLIENT_SECRET=CHANGEME OAUTH2_IDP_HOST_URL=http://localhost:3000/ OAUTH2_REDIRECT_URL=http://localhost:4000/callback OAUTH2_TOKEN_URL=http://localhost:4444/oauth2/token SESSION_SECRET=CHANGEME node ./src/server.js",