-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided. #3073
Comments
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/matteobruni/tsparticles |
The enums are declared as constants since they are stripped from the javascript output, they have a great impact on the output file size. |
The error occurred when deploying to Vercel. My code is this simple component
thanks |
Hi, @IgorThierry. Have you found a temporary fix? I can't deploy my app atm due to this error. |
Actually the only workaround is to disable the I need to find another alternative to strip down enums from the Webpack build since they are only increasing the output size. |
I was testing the These are the steps made:
I didn't receive any error about |
Hi, @matteobruni. I am currently using "dependencies": {
"clsx": "^1.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.2.1",
"react-tsparticles": "^1.40.1",
"sass": "^1.49.7"
},
"devDependencies": {
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@vitejs/plugin-react": "^1.0.7",
"typescript": "^4.4.4",
"vite": "^2.7.2"
} Tried setting |
Hi, @matteobruni Sorry for missing this information, I'm using Vite, just like @calvo-jp . changing flag to false solved the problem. |
Contact Details
igorthierry15@gmail.com
What do you need?
error when deploying when '--isolatedModules' flag is provided.
Version
1.39.3
Which library are you using?
React.js (react-tsparticles, react-particles-js)
Code of Conduct
The text was updated successfully, but these errors were encountered: