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

RFC: Windows support #135

Open
eric-burel opened this issue Nov 12, 2021 · 3 comments
Open

RFC: Windows support #135

eric-burel opened this issue Nov 12, 2021 · 3 comments
Labels

Comments

@eric-burel
Copy link
Collaborator

eric-burel commented Nov 12, 2021

Describe the problem you want to solve or enhancement you want to bring

Support WIndows as much as possible. This is an umbrella issue for all trouble you can encounter when installing Vulcan Next on Windows.

Current issues:

Mongo

  • $(pwd) (current directory) command is not working when running Mongo with Docker
  • Actually, I am not even sure you can dockerize Mongo on Windows
  • Relevant doc: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/
  • We should enhance the documentation/learn tutorial accordingly after finding the best pattern for Windows users

Questions to the community

I am not coding on Windows at all so any help from the community is more than welcome!

@eric-burel eric-burel added the RFC label Nov 12, 2021
@eric-burel
Copy link
Collaborator Author

eric-burel commented Feb 8, 2022

A user reported issues with Cypress, namely the environment loading function not working properly (we have a Cypress plugin that lruns Next.js "loadEnv" logic) in Visual Studio environment.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at Object.join (path.js:424:7)
    at loadEnvConfig (C:\Users\redacted\vulcan-next\node_modules\@next\env\dist\index.js:1:3274)
    at module.exports (C:\Users\redacted\vulcan-next\cypress\plugins\load-env.js:12:33)

Edit: this one issue is now fixed, I was using "process.env.PWD" instead of "process.cwd()"

@daniablank
Copy link

Additionally, when running yarn run dev:test, whether in Visual Studio or not, this stack trace appears.

(node:20144) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, realpath 'C:\Users\dania\Documents\GitHub\Voting-And-Stamps\#'
    at Function.realpathSync.native (fs.js:1855:3)
    at Object.getProjectDir (C:\Users\redacted\Documents\GitHub\Voting-And-Stamps\node_modules\next\dist\lib\get-project-dir.js:39:46)
    at nextDev (C:\Users\redacted\Documents\GitHub\Voting-And-Stamps\node_modules\next\dist\cli\next-dev.js:84:37)
    at C:\Users\redacted\Documents\GitHub\Voting-And-Stamps\node_modules\next\dist\bin\next:119:34
    ```
    
    When I use `yarn run dev` instead and run a barebones Cypress test, I get this error:
    
    ```
    expected { Object (errors, data) } to have property 'length'
cypress/integration/integration/example.spec.js:19:1
  17 |         // https://on.cypress.io/assertions
  18 |         expect(response).property('status').to.equal(200)
> 19 |         expect(response).property('body').to.have.length(500)
     | ^
  20 |         expect(response).to.include.keys('headers', 'duration')
  21 |         })
  22 |     })

@eric-burel
Copy link
Collaborator Author

eric-burel commented Feb 21, 2022

I've fixed running Jest

Now I need to fix running Mongo via the Docker command, as the "volume" path is not correct for windows. I'll probably create another command for Windows that uses a generic path like "C:/Documents/VulcanMongo" or use powershell -Command pwd (https://stackoverflow.com/questions/921741/windows-equivalent-to-unix-pwd).
I couldn't compute the right path though, the command echo "$pwd/.mongo works in the powershell but not if I add it to package.json. See https://stackoverflow.com/questions/46604827/pwd-in-npm-script as well.

Then I'll be able to test Cypress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants