I’m attempting to follow the instructions to create create a bi-directional component available here, using React on Windows.
My setup is as follows:
- Streamlit 1.31.0
- nodejs 20.11.0
- npm 10.2.4
- Windows 10
Steps I’ve taken:
- Cloned the component-template GitHub repo
- In
template/my_component/frontend, run npm install
I get the following error:
npm ERR! code ENOTDIR
npm ERR! syscall mkdir
npm ERR! path G:\Other computers\My Laptop\Documents\Work\Coding\st_component-template_2\template\my_component\frontend\node_modules\babel-jest\node_modules
npm ERR! errno -4052
npm ERR! ENOTDIR: not a directory, mkdir 'G:\Other computers\My Laptop\Documents\Work\Coding\st_component-template_2\template\my_component\frontend\node_modules\babel-jest\node_modules'
npm ERR! A complete log of this run can be found in: C:\Users\phili\AppData\Local\npm-cache\_logs\2024-02-06T20_03_04_381Z-debug-0.log
I’ve posted the log contents here.
Can anyone help me out?
Thanks
Hey @philipnye,
Is there a file called tmp in template/my_component/frontend? What happens if you delete tmp and then try to do npm install again? (related StackOverflow thread)
Hi Caroline.
Thanks - no, there isn’t. The only things in template/my_component/frontend are:
public directory
src directory
.env
pretierrc
package.json
tsconfig.json
For info, yesterday morning I’d raised this as an issue on GitHub here. But any more help you’re able to offer here or there is appreciated 
Thanks,
Philip
If you move the project to a location where the path doesn’t contain spaces, do you still see the same error?
Thank you, that’s fixed it. I seem to have run into this issue, which I didn’t come across when I did a StackOverflow trawl.
I think it might be some combination of trying to run the script on Google Drive on Windows and spaces in the path - I tested and can get it to run on non-Google Drive directories that have spaces in the path.
Thanks very much for your help
Woo glad it’s working!
I think that’s actually the StackOverflow thread where I got the idea 