Hi, I was curious if I can create an empty project for a fullstack app (about the config of the project).
I wanna use React Native for the client and Express for the server.
That’s why I created two separated folders in my blank workspace, but I don´t know if my nix config is throwing me the issue, because when I access the client folder and run the command to see my project in the emulator, it throws me an error (in the screenshot), the content in the client folder was created by using ‘npx create-expo-app@latest . --template blank-typescript’ command.
Any idea on how can I config my empty workspace to work with server and client folders for my React Native app?
my dev.nix is:
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-23.11"; # or "unstable"
packages = [pkgs.nodejs_20];
# Sets environment variables in the workspace
env = {};
idx = {
extensions = [
"msjsdiag.vscode-react-native"
];
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
install = "npm ci --prefer-offline --no-audit --no-progress --timing && npm i @expo/ngrok@^4.1.0";
};
# Runs when a workspace restarted
onStart = {
connect-device = ''
adb -s localhost:5554 wait-for-device
'';
android = ''
npm run android -- --port 5554 --tunnel
'';
};
};
# Enable previews and customize configuration
previews = {
enable = true;
previews = {
web = {
command = ["npm" "run" "web" "--" "--port" "$PORT"];
manager = "web";
};
android = {
# noop
command = ["tail" "-f" "/dev/null"];
manager = "web";
};
};
};
};
}