Skip to content
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

Not working on Windows 10 #216

Closed
hhashmi opened this issue Jun 4, 2017 · 11 comments
Closed

Not working on Windows 10 #216

hhashmi opened this issue Jun 4, 2017 · 11 comments

Comments

@hhashmi
Copy link

hhashmi commented Jun 4, 2017

npm : 3.8.6
node: 5.11.1
(Same version are working on my macbook pro)

  • Downloaded zip file, unzipped
  • npm install (no erros)
  • npm run see (no erros)
  • npm run watch (erros)

ERROR in ./src/client/modules/post/graphql/post_get.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_get.graphql Unexpected character '#' (22:0)
You may need an appropriate loader to handle this file type.
| }
| doc.definitions = doc.definitions.concat(unique(require("./post.graphql"
| #import).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_edit.jsx 19:0-53
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/post_edit.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_edit.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./post.graphql"
|
| mutation).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_edit.jsx 20:0-53
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/post_subscription.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_subscription.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./post.graphql"
|
| subscription).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_edit.jsx 21:0-69
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/post_add.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_add.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./post.graphql"
|
| mutation).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_add.jsx 18:0-51
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/posts_get.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\posts_get.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./post.graphql"
|
| query).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_list.jsx 15:0-55
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/posts_subscription.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\posts_subscription.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./post.graphql"
|
| subscription).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_list.jsx 16:0-71
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/post_comment_add.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_comment_add.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./comment.graphql"
|
| mutation).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_comments.jsx 16:0-62
@ ./src/client/modules/post/containers/post_edit.jsx
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/post_comment_edit.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_comment_edit.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./comment.graphql"
|
| mutation).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_comments.jsx 17:0-64
@ ./src/client/modules/post/containers/post_edit.jsx
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

ERROR in ./src/client/modules/post/graphql/post_comment_subscription.graphql
Module parse failed: D:\WorkForceCity\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\WorkForceCity\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_comment_subscription.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
| doc.definitions = doc.definitions.concat(unique(require("./comment.graphql"
|
| subscription).definitions));
|
| module.exports = doc;
@ ./src/client/modules/post/containers/post_comments.jsx 19:0-80
@ ./src/client/modules/post/containers/post_edit.jsx
@ ./src/client/modules/post/index.jsx
@ ./src/client/modules/index.jsx
@ ./src/common/redux_store.js
@ ./src/server/middleware/website.jsx
@ ./src/server/api_server.js
@ ./src/server/index.js
@ multi babel-polyfill ./src/server/index.js webpack/hot/poll?1000

@larixer
Copy link
Member

larixer commented Jun 4, 2017

@hhashmi This is very strange. Have you tried to delete node_modules and install them afresh? The latest version works fine for me under Windows 7 with Node v6.10.2.

@larixer
Copy link
Member

larixer commented Jun 4, 2017

@hhashmi This generally looks like graphql-tag/loader is not used to load .graphql files. Maybe you have some custom webpack config? Do you run this starter kit unmodified?

@larixer
Copy link
Member

larixer commented Jun 4, 2017

@hhashmi Hmm, I have tried running the latest version of the starter kit under Node v5.11.1 under Windows and it still works fine for me

@mairh mairh changed the title Now working on Windows 10 Not working on Windows 10 Jun 4, 2017
@cyrus-za
Copy link

cyrus-za commented Jun 5, 2017

I am experiencing the same issue. I cloned the project fresh and installed dependencies with yarn, then ran seed and watch.

Module parse failed: D:\Source\Apollo\apollo-universal-starter-kit-master\node_modules\graphql-tag\loader.js!D:\Source\Apollo\apollo-universal-starter-kit-master\src\client\modules\post\graphql\post_comment_edit.graphql Unexpected token (23:0)
You may need an appropriate loader to handle this file type.
|   doc.definitions = doc.definitions.concat(unique(require("./comment.graphql
"

@mairh
Copy link
Member

mairh commented Jun 5, 2017

@cyrus-za Can you post the following info

OS: version
Node: version
npm: version
yarn: version

@cyrus-za
Copy link

cyrus-za commented Jun 5, 2017

Hi,

The issue seems to be with downloading the master zip and extracting that instead of cloning, which is rather weird. It's all working now. Maybe it has to do with my IDE (webstorm) creating files if there's no git repo.

npm 3.10.10
yarn 0.24.4
node 6.10.1
win10 pro OS build 15063.296 version 1703

@mairh
Copy link
Member

mairh commented Jun 5, 2017

Glad it is working for you now.

@larixer
Copy link
Member

larixer commented Jun 6, 2017

This is a problem in graphql-tag/loader. It uses os.EOL to deal with line endings in .graphql files and when it spots non host OS line endings its logic breaks. GitHub and our repo has Unix line endings in all sources files by default. We can force Windows line endings in .graphql files via .gitattributes but it will make Linux users unhappy. Please note that you are generally diverting from our instructions that explicitly says you should clone repo, not download the zip. But to make everyone happy, I would suggest opening Issue or Pull Request on graphql-tag to fix dealing with line endings there

@larixer
Copy link
Member

larixer commented Jun 6, 2017

I have created Pull Request to graphql-tag/loader to fix files with non-native line endings parsing problem:
apollographql/graphql-tag#95

@cyrus-za
Copy link

cyrus-za commented Jun 6, 2017

Thanks for the feedback vlasenko

@larixer
Copy link
Member

larixer commented Jun 7, 2017

graphql-tag has fix for parsing line endings now and starting off from downloaded ZIP under Windows works now.

@larixer larixer closed this as completed Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants