Workspace
Opened this issue · 5 comments
I cannot install the repository with NRM on Windows
The Workspace instruction does not support it for some unknown reason
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:^
Bun is not developed for Windows, currently
I am interested in principle only in the experiment steganography-toolkit but I have to clone the complete package
Would it be more functional for development to have it in different repositories?
Hi! The reason why it's not working is that I'm using bun as package manager. Sorry if I didn't specify it in the README, I will update it!
I suggest to use bun for local development. However, you might be able to use also npm or yarn by doing a couple of tweaks. Note that I'm not completely sure everything will work as expected though. Anyway, try doing these steps:
- Delete the
workspaces
array from the rootpackage.json
cd
intosrc/experiments/steganography-toolkit
- Install the dependencies using either
yarn install
ornpm i --force
(you will probably see some warnings, but you can ignore them) - Tweak the
start
script of thepackage.json
(the one in the project folder, not the one in the root of the repo), changing it frombun run vite
to justvite
- Start the dev server by running
yarn start
/npm start
- The toolkit should now be available at http://localhost:5173/steganography-toolkit/
In this way, you also won't need to install the dependencies of the other projects. Let me know of it goes!
As for your last point, to be honest I didn't expect any of the experiments in this repository to draw anyone's interest. The reason why it's in this repo is that it allows me to easily add new experiments by having shared configs and everything. If it starts getting more popular though, I'm more than happy to move it to its own repo (as it actually was in the past—see here).
Everything correct until the last step:
"Tweak the start script of the package.json (the one in the project folder, not the one in the root of the repo), changing it from bun run vite to just vite"
{
"name": "@webexp/steganography-toolkit",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "vite",
"build": "vite build"
}
and finally:
npm start
@webexp/steganography-toolkit@0.0.0 start
vite
"vite" not recognized as an internal or external command, program or executable batch file.
failed to load config from C:\Users\web-experiments\src\experiments\steganography-toolkit\vite.config.ts
error when starting dev server:
Error: Cannot find module 'vite-plugin-html'
Require stack:
- C:\Users\web-experiments\src\experiments\steganography-toolkit\vite.config.ts
That's weird because Vite should have been installed with the other dependencies. I tried doing the steps above and everything worked fine for me, even though I'm not on Windows. Instead of npm start
, can you try running npx vite
?
I get this
Error: The following dependencies are imported but could not be resolved:
virtual:pwa-register (imported by C:/Users/Downloads/web-experiments/src/experiments/steganography-toolkit/src/providers/ServiceWorkerProvider.tsx)