Coder Social home page Coder Social logo

Comments (3)

ehmicky avatar ehmicky commented on June 26, 2024

Hi @sahibjotsaggu,

Thanks for reaching out. The answer to your question is in #1081 (and in the documentation links mentioned in that issue).

As a side note, please note that the environment variable names in the env option should not start with $. I.e. you want to do env: {MY_ENV: "test"}, not env: {$MY_ENV: "test"}.

from execa.

sahibjotsaggu avatar sahibjotsaggu commented on June 26, 2024

Okay, I see from https://github.com/sindresorhus/execa/blob/main/docs/bash.md#environment-variables that environment variables should get injected but I'm getting this type error I can't seem to resolve:

Screenshot 2024-05-24 at 12 23 27 PM
No overload matches this call.
  The last overload gave the following error.
    Object literal may only specify known properties, and 'env' does not exist in type 'URL'.ts(2769)
script.d.ts(22, 2): The last overload is declared here.

Any insight into this?

from execa.

ehmicky avatar ehmicky commented on June 26, 2024

Hi @sahibjotsaggu,

To help solving those issues, I would recommend:

  • Creating different issues since this is different from the initial problem
  • Pasting the code instead of a screenshot, so we can copy-paste it
  • For type-related problems, including a fully reproducing example with https://www.typescriptlang.org/play
  • Include environment information: Node.js version, TypeScript version, TypeScript config

I have created the following reproduction, and your example works fine for me.

Is there anything in the TypeScript documentation's troubleshooting section that's helping? In particular: the part about the minimum TypeScript version, and the part about ES modules.

from execa.

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.