GithubHelp home page GithubHelp logo

Comments (5)

dangtony98 avatar dangtony98 commented on July 19, 2024 1

You should be able to modify the dev script in your package.json as above with "start:dev": "npx infisical dev nest start --watch" and run npm run start-dev in your command line. It'll recognize that the .env.infisical file is missing and prompt you to input your workspace/project ID again!

from infisical.

dangtony98 avatar dangtony98 commented on July 19, 2024

Hey neyara!

Sorry to hear about the trouble ... So to clarify:

  • The .env.infisical file should contain an ID to your project/workspace on Infisical; it won't be populated with your variables.
  • You're right that in the previous step, once it's been informed then it won't ask you again for that information. The .env file should've been populated though, so that's strange.

We always recommend using Infisical with the automatic approach. In our case, since you're using NestJS, you'd want to modify your package.json file dev script to the following:

"start:dev": "npx infisical dev nest start --watch"

Afterward, you should be able top run "npm run start:dev" to start up your development server.

Can you hop over to our Slack channel here? — I'd be more than happy to assist you in real-time!

from infisical.

neyara avatar neyara commented on July 19, 2024

Oh, I didn't realize the .env.infisical was actually supposed to have the project ID... And I had deleted it before executing npx infisical pull dev since I mistakenly thought it was the "default" env file when using Infisical. I guess that would explain why I'm getting the "undefined" error now. Is there a way to regenerate this file (.env.infisical)? I tried recreating it manually, but the error still persists.

from infisical.

neyara avatar neyara commented on July 19, 2024

Thanks, that worked! Even though the .env file was not filled visually, the project started with no complaints 😅
I'll keep investigating, I may have missed something. But I appreciate your help 😄

from infisical.

dangtony98 avatar dangtony98 commented on July 19, 2024

Yay! That's awesome — The automatic approach works like magic 🙂

We support .env files as well (you'd have to manually type npx infisical pull dev to update or reconstruct it locally) but, to be honest, the automatic approach way better because you and your team can stay in sync with the right set of environment variables at all times!

from infisical.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.