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

Incorrect default type package.json for ui package? #9594

Open
1 task done
mastoj opened this issue Dec 9, 2024 · 0 comments
Open
1 task done

Incorrect default type package.json for ui package? #9594

mastoj opened this issue Dec 9, 2024 · 0 comments
Assignees
Labels
area: examples Improvements or additions to examples

Comments

@mastoj
Copy link

mastoj commented Dec 9, 2024

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/mastoj/turborepo-bug

Which canary version will you have in your reproduction?

2.3.4-canary.2

Enviroment information

CLI:
   Version: 2.3.4-canary.2
   Path to executable: /Users/tomas/tmp/my-turborepo/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: npm

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 18299
   Available CPU cores: 12

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): vscode
   Terminal program version (TERM_PROGRAM_VERSION): 1.95.3
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

I added a very simple ts-file to explore dependencies and was faced with a lot of small weird issues. I added the file hello.ts with a small function that I wanted to test in the button component. When adding a reference to the file in the button component it asks me to import it as "./hello.js" in VS Code, but having a reference with ".js" did not build.

I expected it to be imported as "./hello" without an error message in VS Code, and I expected that to build.

Actual behavior

I get a error in the IDE while it is still building. If I fix the error in the IDE (VS Code) the build fails.

To Reproduce

Clone repo and open the button.tsx, there you will see an error in the file even though it still builds:

image

Additional context

If you remove the "type": "module" in the package.json in the UI package everything is as I would expect.

@mastoj mastoj added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Dec 9, 2024
@chris-olszewski chris-olszewski added area: examples Improvements or additions to examples and removed kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Dec 10, 2024
@anthonyshew anthonyshew self-assigned this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples
Projects
None yet
Development

No branches or pull requests

3 participants