stylex: Can't get the project to run locally on Windows
Node version: v18.18.1 NPM: 9.8.1
Steps followed:
- Forked the repository
- Ran npm install in the root directory
- Ran npm start -w docs
Error: Cannot find package 'C:\Users\Kevin\Documents\stylex\node_modules\@stylexjs\babel-plugin\' imported from C:\Users\Kevin\Documents\stylex\apps\docs\babel-virtual-resolve-base.js
Am I missing a step? It seems every command I try (build) results in some sort of error.
https://github.com/facebook/stylex/blob/main/.github/CONTRIBUTING.md
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 25 (17 by maintainers)
I hope to fix everything such that no workarounds are needed.
Quick Update: I have reproduced the problem and identified the various causes for breakages.
EDIT: Ignore what I said earlier, I think I’ve found the fix for the problem. I’ll merging it shortly.
@weti09 Yes, working on getting this problem solved, but it’s good to know that there is a workaround available in the meantime.
@nmn Yes, using a WSL works. But it would be great to find the issue so we don’t have to start a WSL every time.
Can you reset to head and delete all non tracked files and run non install again? git reset --hard HEAD git clean -fdX If this doesn’t work, try to use node v21. Also was wondering what shell you are using?
Hi everyone you can run the following command to build the necessary files check #67
Its mentioned in the readme for the docs section as well at the very top 😃
According to the root
README
, you can either build all packages at once or specify the package name with-w
flag. I tried building them all, but it failed (I assume because some of the packages don’t have a specified build command) so I just built the dependencies of thedocs
app. I did that by running thenpm run build -w <package-name>
with each of the packages that I listed above.I had the same issue on
macOS Ventura 13.3.1
runningNode 18.19.0
. Was able to start the development server after I manually built@stylexjs/babel-plugin
,@stylexjs/eslint-plugin
,@stylexjs/shared
and@stylexjs/stylexjs
.Yeah first thing I did. I will also try to get it working on my macbook. Will get back to you with my results as soon I get the chance