I'm creating a next app for work so I've been working on it on my home and work computers. Last night I was working on the project on my home computer that already had the Supabase package installed. I pulled my changes to my work computer. Supabase requests were working as expected. I committed and pushed my changes from my work computer and pulled them to my home computer when I got home. I started up the dev server in vscode and now I'm getting an error telling me the Supabase package doesn't exist. What's going on??
我正在为工作创建一款Next应用程序,所以我一直在家里和公司的电脑上开发它。昨天晚上,我在家里的电脑上做这个项目,它已经安装了Supabase包。我把我的零钱放到了我的工作电脑上。Supabase请求的工作情况与预期一致。我从我的工作电脑上提交并推送我的更改,回到家后把它们拉到我的家用电脑上。我在vscode中启动了dev服务器,现在收到一个错误,告诉我Supabase包不存在。到底怎么回事??
{
"name": "nortech_retail",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@supabase/supabase-js": "^2.33.1",
"autoprefixer": "10.4.15",
"eslint": "8.48.0",
"eslint-config-next": "13.4.19",
"next": "13.4.19",
"postcss": "8.4.29",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.3"
}
}
更多回答
优秀答案推荐
As per your description, there could be a possibility as stated. You need to check your package.json
file for updated dependencies.
根据你的描述,可能有一种可能性。您需要检查package.json文件以获取更新的依赖项。
Also, it is likely that node_modules/ path in your repository source is added to .gitignore file and is hence not tracked by Git, due to which your modules in work and personal home computer are not synced up (which is expected).
If you have added and pushed your changes from home computer and pulled them into your work computer as per your case, run npm install
to install the new dependency in your system. Then proceed with running your application with either npm start
or npm run build
.
此外,您的存储库源中的NODE_MODULES/PATH可能被添加到.gitignore文件中,因此不会被Git跟踪,这是因为您的工作和个人家用计算机中的模块没有同步(这是意料之中的)。如果您已从家庭计算机添加并推送更改,并根据您的情况将它们拉入您的工作计算机,请运行NPM安装以在您的系统中安装新的依赖项。然后使用NPM Start或NPM run Build继续运行您的应用程序。
更多回答
我是一名优秀的程序员,十分优秀!