mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #4072] Don't exist a file .env in the root directory - Failed build #1455
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1455
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @monique77 on GitHub (May 18, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4072
Hello, please I need help.
In the root directory has a file .env.example, if I execute docker-compose up -d, it isn't possible to find the file .env
root@monique-martins:/home/monique/Downloads/hoppscotch/hoppscotch-main# docker-compose up -d
ERROR: Couldn't find env file: /home/monique/Downloads/hoppscotch/hoppscotch-main/.env
So, I renamed a file from .env_example to .env and executed the command docker-compose up -d, but it wasn't possible to find a file .env_example. But the project has only one file named .env_example in the root directory.
Follow the log
@hoppscotch/selfhost-web@2024.3.3 generate /usr/src/app/packages/hoppscotch-selfhost-web
failed to load config from /usr/src/app/packages/hoppscotch-selfhost-web/vite.config.ts
error during build:
ReferenceError: [import-meta-env] failed to load file content from "/usr/src/app/.env.example".
at resolveEnvExampleKeys (/usr/src/app/node_modules/.pnpm/@import-meta-env+unplugin@0.4.10_@import-meta-env+cli@0.6.3_dotenv@16.3.1/node_modules/@import-meta-env/unplugin/dist/index.js:111:11)
at /usr/src/app/node_modules/.pnpm/@import-meta-env+unplugin@0.4.10_@import-meta-env+cli@0.6.3_dotenv@16.3.1/node_modules/@import-meta-env/unplugin/dist/index.js:1445:26
at Object. (/usr/src/app/node_modules/.pnpm/unplugin@1.5.1/node_modules/unplugin/dist/index.js:1503:32)
at file:///usr/src/app/packages/hoppscotch-selfhost-web/vite.config.ts.timestamp-1716071155200-3b27aebf9a492.mjs:380:56
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async loadConfigFromBundledFile (file:///usr/src/app/node_modules/.pnpm/vite@4.5.0_@types+node@18.18.8_sass@1.69.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66322:21)
at async loadConfigFromFile (file:///usr/src/app/node_modules/.pnpm/vite@4.5.0_@types+node@18.18.8_sass@1.69.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66171:28)
at async resolveConfig (file:///usr/src/app/node_modules/.pnpm/vite@4.5.0_@types+node@18.18.8_sass@1.69.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:65767:28)
at async build (file:///usr/src/app/node_modules/.pnpm/vite@4.5.0_@types+node@18.18.8_sass@1.69.5_terser@5.27.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:47926:20)
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Command failed with exit code 1.
The command '/bin/sh -c pnpm run generate' returned a non-zero code: 1
ERROR: Service 'hoppscotch-aio' failed to build : Build failed
@Leon-Luu commented on GitHub (May 22, 2024):
Hello
You should be able to build with just copy from .env to .env.example without deleting the .env.example