Comments (3)
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.
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](https://private-user-images.githubusercontent.com/8991960/333663216-4083199d-d871-41c4-a6cb-f74fa2636546.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTcxOTQ4ODgsIm5iZiI6MTcxNzE5NDU4OCwicGF0aCI6Ii84OTkxOTYwLzMzMzY2MzIxNi00MDgzMTk5ZC1kODcxLTQxYzQtYTZjYi1mNzRmYTI2MzY1NDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDUzMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA1MzFUMjIyOTQ4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDU3Yjk5NjkwOGY4NWRmNzU3MjkzNTFmYmFlZDU4ZTllMmQ2ODdkMWE0YzE0ODQ1NGUxZmM5NmRmMzU0YjZjMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.A3SGR4kxd5pKcL4B-n05irxndsdgLPYQA1-4mtJqwBc)
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.
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)
- breaking changes not included in v9 release notes HOT 5
- Promise-based IPC HOT 2
- Remove `execaCommand()`
- Deprecating old `ipc` option HOT 1
- The `stdin` and `stdout` options must not target a file path string that is the same. HOT 2
- Export `Execa` and `ExecaScript` types. HOT 2
- v9.1.0 possible bug HOT 4
- template syntax HOT 2
- Select specific IPC messages
- Avoid race conditions with IPC
- backup-file-in-package HOT 2
- Cannot set properties of null (setting 'peer') HOT 1
- 9.2.0 release post HOT 2
- execa with env option not working HOT 5
- Do not disconnect IPC on `error` event
- Node.js engine version in package.json is not up-to-date HOT 6
- Document CLI utilities
- Subprocess is considered as failed exit when using `process.kill` on windows only HOT 6
- Graceful termination HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from execa.