Hello everyone, if you know this issue, please help me fix it. I follow the tutorial, but this error:
[ERROR] Failed to resolve entry for package "https". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/micro-ftch/index.js:55:26:
55 │ const https = require('https');
╵ ~~~~~~~
File main.tsx
import { AuthCoreContextProvider } from '@particle-network/auth-core-modal';
import { Buffer } from 'buffer';
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import './index.css';
if (typeof window !== 'undefined') {
window.Buffer = Buffer;
window.__PARTICLE_ENVIRONMENT__ = import.meta.env.VITE_PARTICLE_ENV;
}
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<AuthCoreContextProvider
options={{
projectId: import.meta.env.VITE_PROJECT_ID as string,
clientKey: import.meta.env.VITE_CLIENT_KEY as string,
appId: import.meta.env.VITE_APP_ID as string,
}}
>
<App />
</AuthCoreContextProvider>
</React.StrictMode>
);
Hello everyone, if you know this issue, please help me fix it. I follow the tutorial, but this error:
File main.tsx