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

Error in packages on windows #695

Closed
leonardoXoliveira opened this issue May 20, 2021 · 8 comments · Fixed by #887
Closed

Error in packages on windows #695

leonardoXoliveira opened this issue May 20, 2021 · 8 comments · Fixed by #887
Assignees
Labels
bug Something isn't working

Comments

@leonardoXoliveira
Copy link

image

https://files.slack.com/files-pri/T01U12D64J3-F0237JDBAM6/image.png

@leonardoXoliveira leonardoXoliveira changed the title Error ir packages on windows Error in packages on windows May 20, 2021
@tlgimenes tlgimenes added the bug Something isn't working label May 21, 2021
@tlgimenes
Copy link
Contributor

Thanks for contributing @leonardoXoliveira !

Can you share with us:

  1. The steps to reproduce it
  2. Environment you are using (a.k.a WSL, promp, etc)

Thanks!

@milaniromulo
Copy link

Hi @tlgimenes, i had the same problem here.
The steps were these: git clone > yarn to install > yarn develop to run.

This error appears in the terminal:

[gatsby-plugin-graphql] Error: Could not find fragment OrderFormFragment_orderForm for query SetRegionMutation
    at QueryManager.ensureRequiredFragments (D:\test\freewaystore.store\node_modules\@vtex\gatsby-plugin-graphql\manager.js:121:23)
    at D:\test\freewaystore.store\node_modules\@vtex\gatsby-plugin-graphql\manager.js:129:18
    at Array.map (<anonymous>)
    at QueryManager.getQueries (D:\test\freewaystore.store\node_modules\@vtex\gatsby-plugin-graphql\manager.js:128:31)
    at D:\test\freewaystore.store\node_modules\@vtex\gatsby-plugin-graphql\webpack.js:123:44
    at Hook.eval [as callAsync] (eval at create (D:\test\freewaystore.store\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:37:17)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (D:\test\freewaystore.store\node_modules\tapable\lib\Hook.js:18:14)
    at Watching._done (D:\test\freewaystore.store\node_modules\webpack\lib\Watching.js:199:28)
    at D:\test\freewaystore.store\node_modules\webpack\lib\Watching.js:127:21
    at Compiler.emitRecords (D:\test\freewaystore.store\node_modules\webpack\lib\Compiler.js:846:39)
    at D:\test\freewaystore.store\node_modules\webpack\lib\Watching.js:105:22
    at D:\test\freewaystore.store\node_modules\webpack\lib\Compiler.js:828:14
    at Hook.eval [as callAsync] (eval at create (D:\test\freewaystore.store\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (D:\test\freewaystore.store\node_modules\tapable\lib\Hook.js:18:14)
    at D:\test\freewaystore.store\node_modules\webpack\lib\Compiler.js:825:27
    at D:\test\freewaystore.store\node_modules\neo-async\async.js:2818:7

and in localhost, the same error appears in the @leonardoXoliveira print.

I'm using Windows 10 + PowerShell 7.0.3.
I tested in a macOS and just works with yarn if you install with npm there is also an error

@tlgimenes
Copy link
Contributor

Thanks for contributing @milaniromulo!

Currently, we don't support npm, only yarn. Also, this seems like this babel/webpack plugin couldn't find the files to replace. I bet this is something to do with windows file system being non POSIX.

Can you do a test using wsl? This should be a POSIX compliant solution and this could work

@milaniromulo
Copy link

Hi @tlgimenes, sorry for the delay. We did tests with WSL and it's works :)
I think we can continue now, tks bro.

@leonardoXoliveira
Copy link
Author

Hello @tlgimenes , thanks for clarification.

At wsl, we face some issues with permission and stuff but we managed to solve. We will include this in the documentation if we have questions from other developers.

Tks!

@Gmantiqueira
Copy link
Contributor

Gmantiqueira commented May 25, 2021

@tlgimenes I think it's better to fix the Windows behavior instead of using WSL. Particularly, I don't have a good developing experience using WSL, people reported that they had a slow developing experience using WSL and we have a good part of our external devs using Windows OS.

I investigated using Windows OS and we started having those problems after this PR. We are using a process.cwd() there and I found that this function is inconsistent across those platforms, but I'm still reading about (it's from 2016, idk it's deprecated) and I'm comparing OSX and Windows behaviors.

I'm still investigating about this, so I'm reopening this issue.

@Gmantiqueira Gmantiqueira reopened this May 25, 2021
@Gmantiqueira Gmantiqueira self-assigned this May 25, 2021
@tlgimenes
Copy link
Contributor

nice @Gmantiqueira ! I've seem people using program instead of process, maybe this is more consistent. Wanna give it a try? Thanks for taking this issue btw

@Gmantiqueira
Copy link
Contributor

It seems to be fixed after this update #887. We just need to update our stores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants