Reaction: Unterminated string constant prevents start

Created on 25 Oct 2018  路  6Comments  路  Source: reactioncommerce/reaction

Issue Description

Starting reaction fails in Windows due to "Unterminated string constant (1:41)" error in various files. This happens when running reaction directly, with docker and when using reaction-platform.

`Errors prevented startup:

While building for web.browser:
imports/plugins/core/graphql/lib/mutations/updateFulfillmentOptionsForGroup.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/createFlatRateFulfillmentMethod.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/updateFlatRateFulfillmentMethod.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/deleteFlatRateFulfillmentMethod.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/placeOrderWithExampleIOUPayment.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/placeOrderWithStripeCardPayment.graphql:1:41: Unterminated string constant (1:41)

While building for web.browser.legacy:
imports/plugins/core/graphql/lib/mutations/updateFulfillmentOptionsForGroup.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/createFlatRateFulfillmentMethod.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/updateFlatRateFulfillmentMethod.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/deleteFlatRateFulfillmentMethod.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/placeOrderWithExampleIOUPayment.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/graphql/lib/mutations/placeOrderWithStripeCardPayment.graphql:1:41: Unterminated string constant (1:41)

While building for os.linux.x86_64:
imports/plugins/core/core/server/no-meteor/schemas/address.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/base.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/currency.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/email.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/metafield.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/node.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/shop.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/core/server/no-meteor/schemas/tag.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/accounts/server/no-meteor/schemas/account.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/accounts/server/no-meteor/schemas/group.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/accounts/server/no-meteor/schemas/role.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/cart/server/no-meteor/schemas/cart.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/cart/server/no-meteor/schemas/checkout.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/catalog/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/orders/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/payments/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/product/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/core/shipping/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/included/marketplace/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/included/payments-example/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/included/payments-stripe/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/included/shipping-rates/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)
imports/plugins/included/sitemap-generator/server/no-meteor/schemas/schema.graphql:1:41: Unterminated string constant (1:41)

Your application has errors. Waiting for file change.`

Steps to Reproduce

Either

checkout reaction and run reaction

or

checkout reaction and run docker-compose up -d

or

checkout reaction-platform and run make

Versions

Windows 10
Node 8.11.3
npm 6.4.1
Meteor 1.8
reaction 2.0.0-rc.5

Most helpful comment

Thanks a lot! That solved the issue.

All 6 comments

Thanks for the report @derBretti. Someone will try to reproduce this and figure it out.

Note: This was reported also in #4681, which I closed because it wasn't clear in that issue that this is also happening in Docker on Windows.

My only thought is that maybe Windows is altering .graphql files somehow (or something about the way they are stored in Git), such that the files themselves become different on the host OS and are then linked into the container that way.

My first guess is git for windows automatically converting unix newlines to windows newlines, and that chocking up whatever is parsing those graphql files.

The relevant git configuration is:

[core]
          autocrlf = input

I think what that means is to use the line endings in the repo regardless of your OS defaults. @derBretti could you set that git configuration parameter and try re-cloning the repository?

Thanks a lot! That solved the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeffcorpuz picture jeffcorpuz  路  3Comments

ajporlante picture ajporlante  路  4Comments

spencern picture spencern  路  3Comments

aldeed picture aldeed  路  4Comments

coooolers picture coooolers  路  4Comments