小编Orh*_*çin的帖子

无法部署 React 项目。错误是命令失败,退出代码为 1

我编写了我的 React 项目,可以在本地主机上运行,​​也可以yarn build在我的计算机上使用命令进行构建。

我将我的项目推送到 github ( Repo )。当我想将我的项目部署到 Vercel 或 Netlify 时,我收到了错误,Cannot find file '../../components/collection-item/Collection-item' in './src/pages/collection'.但是路径没有问题,或者我说我可以在我自己的计算机上运行和构建它。我找不到解决办法。我更改了文件名和路径仍然相同。

这是 Netlify 日志:

1:24:32 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
1:24:32 PM: build-image tag: v3.4.1
1:24:32 PM: buildbot version: bca3bbf1ce7c7ca2e2192b1683becc1d98c88c5b
1:24:32 PM: Fetching cached dependencies
1:24:32 PM: Failed to fetch cache, continuing with build
1:24:32 PM: Starting to prepare the repo for build
1:24:32 PM: No cached dependencies found. Cloning fresh repo
1:24:32 PM: git clone https://github.com/OrhanOzkercin/ReactShop
1:24:33 PM: Preparing …
Run Code Online (Sandbox Code Playgroud)

reactjs

5
推荐指数
2
解决办法
4510
查看次数

Nuxt3 与 VueUse Motion '无法启动 nuxt:包子路径 './nuxt' 未由“导出”定义'

我一直在尝试将VueUse Motion与 Nuxt3 一起使用。我已按照文档进行安装@vueuse/motio,然后添加'@vueuse/motion/nuxt'到我的nuxt.config.ts文件中。但是当我想运行开发服务器时,它会产生以下错误:

Cannot start nuxt: Package subpath './nuxt' is not defined by "exports" in C:\Users\orhan\Desktop\p3\node_modules\@vueuse\motion\package.json 在此输入图像描述

这是我的模块nuxt.config.ts

  modules: [
    '@nuxtjs/i18n',
    '@nuxtjs/tailwindcss',
    '@vueuse/nuxt',
    '@pinia/nuxt',
    '@vueuse/motion/nuxt',
  ],
Run Code Online (Sandbox Code Playgroud)

我的package.json文件:

  "devDependencies": {
    "@iconify/json": "^2.1.116",
    "@nuxt/types": "^2.15.8",
    "@nuxtjs/google-fonts": "^3.0.0-0",
    "@nuxtjs/tailwindcss": "^5.3.3",
    "@tailwindcss/typography": "^0.5.7",
    "@vueuse/motion": "^2.0.0-beta.12",
    "nuxt": "3.0.0-rc.11",
    "prettier": "^2.7.1",
    "prettier-plugin-tailwindcss": "^0.1.13",
    "sass": "^1.55.0",
    "sass-loader": "^13.0.2",
    "unplugin-icons": "^0.14.11",
    "unplugin-vue-components": "^0.22.7"
  },
  "dependencies": {
    "@nuxtjs/i18n": "^8.0.0-alpha.2",
    "@pinia/nuxt": "^0.4.2",
    "@vueuse/nuxt": "^9.3.0",
    "daisyui": "^2.31.0"
  }
Run Code Online (Sandbox Code Playgroud)

nuxtjs3 vueuse

1
推荐指数
1
解决办法
901
查看次数

标签 统计

nuxtjs3 ×1

reactjs ×1

vueuse ×1