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

Elements v^8.1.3 => Unfound type declaration with NextJs 14.2.3 #2589

Open
nulltoken opened this issue May 29, 2024 · 6 comments
Open

Elements v^8.1.3 => Unfound type declaration with NextJs 14.2.3 #2589

nulltoken opened this issue May 29, 2024 · 6 comments

Comments

@nulltoken
Copy link

Follow up to #2345

Context

I'm trying to use elements in a Next.js app configured with static export

Current Behavior

Using a freshly installed Nextjs 14.2.3 app, install latest 8.1.3 version.
Update app/page.tsx to include thse snippet from #2345 (comment)

VsCode complains wth Could not find a declaration file for module '@stoplight/elements'.

image

Expected Behavior

  • No warning
  • npm run build works
  • static export work as intended

Possible Workaround/Solution

No (easy) one

Steps to Reproduce

See above

Environment

Node 20.10

  "dependencies": {
    "@stoplight/elements": "^8.1.3",
    "next": "14.2.3",
    "react": "^18",
    "react-dom": "^18"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "eslint": "^8",
    "eslint-config-next": "14.2.3",
    "typescript": "^5"
  }
@kikisaeba
Copy link

I'm also affected by this.

@brendarearden
Copy link
Contributor

@nulltoken do you have a sample app that you could provide for reproduction of this issue?

Copy link

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-575) has been created.

@nulltoken
Copy link
Author

nulltoken commented May 31, 2024

@brendarearden Thanks for getting back to me. Here's the sample app.

Just npm ci it and you should be good to go
The issue will appear if you open the folder with VSCode and switch to the app/page.tsx file

my-app.zip

@Amachua
Copy link

Amachua commented Jun 11, 2024

I have same issue as the one described here and I would be pleased if a solution is shipped on the next release.

@weyert
Copy link
Contributor

weyert commented Jun 13, 2024

Yeah, you need to patch the package (like with patch-package) until this gets merged: stoplightio/scripts#115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants