next.js 如何解决错误:EPERM:不允许操作,符号链接'contact.func' ->'\.vercel\output\functions\API\getExperience. func'?

fzwojiic  于 2023-03-18  发布在  其他
关注(0)|答案(1)|浏览(178)

我正在部署一个带有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"

> portfolio-react@0.1.0 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'

帮助将不胜感激

4ioopgfo

4ioopgfo1#

我刚把这个文件从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外部(如果您正在使用它)以管理员身份运行终端

相关问题