如何解决Error: EPERM: operation not permitted, symlink 'contact.func' -> '\.vercel\output unctions pi\getExperience.func'?

问题描述 投票:0回答:1

我正在使用 sanity build 部署 NextJs 项目,但出现以下错误:

Error: EPERM: operation not permitted, symlink 'contact.func' -> 'C:\Users\Arotiana's\portfolio-react\.vercel\output\functions\api\getExperience.func'

我尝试更改文件夹的权限,但同样的错误再次出现

这是整个过程:

    PS C:\Users\Arotiana's\portfolio-react> vercel build
Vercel CLI 28.10.1
WARNING: You should not upload the `.next` directory.
Installing dependencies...

up to date in 15s

105 packages are looking for funding
  run `npm fund` for details
Detected Next.js version: 13.0.6
Detected `package-lock.json` generated by npm 7+...
Running "npm run build"

> [email protected] build
> next build

info  - Linting and checking validity of types  
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data  
[   =] info  - Generating static pages (2/3)(node:5472) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
info  - Generating static pages (3/3)
info  - Finalizing page optimization

Route (pages)                              Size     First Load JS
┌ ● / (14855 ms)                           112 kB          185 kB
├   └ css/53a9169c96cbb4d8.css             2.2 kB
├   /_app                                  0 B            73.2 kB
├ ○ /404                                   181 B          73.4 kB
├ λ /api/contact                           0 B            73.2 kB
├ λ /api/getExperience                     0 B            73.2 kB
├ λ /api/getPageinfo                       0 B            73.2 kB
├ λ /api/getProject                        0 B            73.2 kB
├ λ /api/getSkills                         0 B            73.2 kB
└ λ /api/hello                             0 B            73.2 kB
+ First Load JS shared by all              77.2 kB
  ├ chunks/framework-3b5a00d5d7e8d93b.js   45.4 kB
  ├ chunks/main-f2e125da23ccdc4a.js        26.7 kB
  ├ chunks/pages/_app-a96cacb95f41a3ef.js  286 B
  ├ chunks/webpack-59c5c889f52620d6.js     819 B
  └ css/bfe58de89cfcdd1e.css               3.95 kB

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)  automatically rendered as static HTML (uses no initial props)
●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)

Traced Next.js server files in: 5.050s
Created all serverless functions in: 2.294s
Collected static files (public/, static/, .next/static): 518.68ms
Error: EPERM: operation not permitted, symlink 'contact.func' -> 'C:\Users\Arotiana's\portfolio-react\.vercel\output\functions\api\getExperience.func'

帮助将不胜感激

next.js deployment web-deployment sanity sanity-check
1个回答
0
投票

我刚刚将这个文件从 API 文件夹中移出:

 /api/getExperience                     0 B            73.2 kB
├ λ /api/getPageinfo                       0 B            73.2 kB
├ λ /api/getProject                        0 B            73.2 kB
├ λ /api/getSkills

并将它们粘贴到项目根目录的自定义文件夹中,然后调整导入。 并在部署项目时从 vscode 外部以管理员身份运行终端(如果你正在使用它)

© www.soinside.com 2019 - 2024. All rights reserved.