Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Bot TS template has errors due to invalid tsconfig #13254

Open
ridomin opened this issue Feb 20, 2025 · 6 comments
Open

Basic Bot TS template has errors due to invalid tsconfig #13254

ridomin opened this issue Feb 20, 2025 · 6 comments
Assignees
Labels
investigating needs more info Need user to provide more info TA:Compute Team Area: Compute

Comments

@ridomin
Copy link

ridomin commented Feb 20, 2025

When creating a new BasicBot app in TS:

Create new app -> Bot -> BasicBot -> TS

The produced tsconfig has the following errors

[{
	"resource": "/c:/Users/XXX/TeamsApps/MyBasicTSBot/tsconfig.json",
	"owner": "typescript",
	"severity": 8,
	"message": "Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'.",
	"source": "ts",
	"startLineNumber": 5,
	"startColumn": 15,
	"endLineNumber": 5,
	"endColumn": 25
}]
Copy link

👋 Hi @ridomin,

Thank you for reporting this issue! We want to let you know that:

⏱️ Our team will personally review your issue
🎯 You can expect a response within 2 business days

✨ This is an AI-generated initial response
🤖 AI-Generated Preliminary Analysis:

The error you are encountering is due to a mismatch in the TypeScript tsconfig.json settings. Specifically, the module option must be set to NodeNext when the moduleResolution option is set to NodeNext. Here are the steps to resolve this issue:

  1. Open the tsconfig.json file in your project directory.

  2. Update the compilerOptions to ensure that both module and moduleResolution are set to NodeNext. Your tsconfig.json should look something like this:

    {
      "compilerOptions": {
        "target": "ES6",
        "module": "NodeNext",
        "moduleResolution": "NodeNext",
        "outDir": "./dist",
        "rootDir": "./src",
        "strict": true,
        "esModuleInterop": true,
        "skipLibCheck": true,
        "forceConsistentCasingInFileNames": true
      }
    }
  3. Save the tsconfig.json file and try rebuilding your project.

This should resolve the error you are seeing. For further information, you can refer to the TypeScript documentation on module resolution options.

If you continue to encounter issues, please provide additional details or error messages, and I can assist you further.


Note: This is an automated first response generated by AI. A human team member will review your issue and provide a more detailed response soon. We appreciate your patience!

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Feb 20, 2025
@sayali-MSFT
Copy link

@ridomin ,
Thank you for your inquiry about your Teams app development issue!
We are checking the issue. We will get back to you shortly.

@sayali-MSFT
Copy link

@ridomin , Thank you for your patience! We were able to reproduce the issue. We have reported this as a bug for further investigation.

We will keep you updated as soon as we receive further information. Thank you for bringing this to our attention!

Image

@Yimin-Jin
Copy link
Contributor

Hi @ridomin. I tried the latest release and pre-release versions but couldn't reproduce the issue. Could you please provide the node version and Teams Toolkit version you're using to help us identify the problem? Thank you.

@ridomin
Copy link
Author

ridomin commented Feb 26, 2025

"module": "commonjs",
"outDir": "./lib",
"rootDir": "./",
"moduleResolution": "nodenext",

@Yimin-Jin
Copy link
Contributor

Hello @ridomin, I have tested the latest pre-release and release versions of Teams Toolkit, but I was unable to reproduce the issue you mentioned. Could you please provide details about your runtime environment, including your Node.js version and Teams Toolkit version?

  • To check your Node.js version, you can run the following command in Windows PowerShell: node -v

  • You can find the Teams Toolkit version in the Extensions view of Visual Studio Code.

Image

Thank you!

@Yimin-Jin Yimin-Jin added needs more info Need user to provide more info and removed needs attention This issue needs the attention of a contributor. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating needs more info Need user to provide more info TA:Compute Team Area: Compute
Projects
None yet
Development

No branches or pull requests

4 participants