I am using Gemini ai with flask built in template but is showing logs error i don’t why I try to add package but build environment is also failed???
We’re aware of this issue and a fix is on its way, but we can unblock you before it is rolled out. Can you add the following to your env block in dev.nix and rebuild your environment please?
Please let us know if that does not work.
env = {
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (with pkgs; [ stdenv.cc.cc ])}:$LD_LIBRARY_PATH";
};
If you’re getting errors from building environment, can you post the error you’re seeing please?
I’m running into the same or similar issue. Select the Gemini AI template with Flask to start a new Google IDX project and see an error when starting the preview. This is after adding the code snippet you included in my dev.nix file.
Installing extensions...
Extension 'ms-python.python' v2024.12.3 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-python.python@1.2.3'.
<IDX> Starting preview...
Waiting for your web server to start serving
Error: /home/user/test-flask-app-new/.venv/bin/python: No module named flask
<IDX> ✘ Preview failed to start
<IDX> Starting preview...
Waiting for your web server to start serving
Error: /home/user/test-flask-app-new/.venv/bin/python: No module named flask
<IDX> ✘ Preview failed to start
Installing extensions...
Extension 'ms-python.python' v2024.12.3 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-python.python@1.2.3'.
<IDX> Starting preview...
Waiting for your web server to start serving
Error: /home/user/test-flask-app-new/.venv/bin/python: No module named flask
<IDX> ✘ Preview failed to start
<IDX> Starting preview...
Waiting for your web server to start serving
Error: /home/user/test-flask-app-new/.venv/bin/python: No module named flask
<IDX> ✘ Preview failed to start
Installing extensions...
Extension 'ms-python.python' v2024.12.3 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-python.python@1.2.3'.
<IDX> Starting preview...
Waiting for your web server to start serving
Error: /home/user/test-flask-app-new/.venv/bin/python: No module named flask
<IDX> ✘ Preview failed to start
<IDX> Starting preview...
Waiting for your web server to start serving
Error: /home/user/test-flask-app-new/.venv/bin/python: No module named flask
<IDX> ✘ Preview failed to start
Thanks for trying IDX out Justin. This looks like a separate issue where somehow flask wasn’t installed. Can you install it manually with by running the commands in create-venv
block inside dev.nix please? (and rebuild the environment after that)