Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unable to build the app #17469

Closed
7 tasks done
roshansahu2022 opened this issue Jun 13, 2024 · 4 comments
Closed
7 tasks done

Unable to build the app #17469

roshansahu2022 opened this issue Jun 13, 2024 · 4 comments

Comments

@roshansahu2022
Copy link

roshansahu2022 commented Jun 13, 2024

Describe the bug

We were using CRA for our App. Now I am trying to migrate the project from CRA to vite.
went through multiple blogs to migrate to vite. After the migration I am getting the below Error.
tried multiple things in vite.config.ts but still getting the same error. Thanks in advance for any help
Screenshot 2024-06-13 at 11 09 47 PM

Reproduction

na

Steps to reproduce

the node modules are generating js files which are having typescripts.Attached the SS for the same

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 80.00 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Brave Browser: 110.1.48.171
    Safari: 17.5
  npmPackages:
    @vitejs/plugin-react: ^4.3.1 => 4.3.1 
    vite: ^5.2.13 => 5.3.0

Used Package Manager

yarn

Logs

No response

Validations

@dasa
Copy link

dasa commented Jun 13, 2024

Sounds similar to #17466

Copy link

Hello @roshansahu2022. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@bluwy
Copy link
Member

bluwy commented Jun 14, 2024

From your screenshot, import type can only be used in .ts files. import typeof is not valid.

@roshansahu2022
Copy link
Author

@bluwy those files are automatically generated inside node modules as part of other package downloads. Those files are causing the issue.

@vitejs vitejs locked and limited conversation to collaborators Jun 14, 2024
@bluwy bluwy converted this issue into discussion #17477 Jun 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants