NodeJS 代码EPERM系统调用取消链接错误,生成错误[4294963248]:生成失败,退出代码为4294963248

lyr7nygr  于 2023-02-21  发布在  Node.js
关注(0)|答案(1)|浏览(298)

请注意,我使用的是Vscode,如果它意味着什么。现在的问题。我的程序用来运行良好,直到最近。我不记得发生了什么,但由于某种原因,我无法运行我的应用程序。这个问题似乎与 typescript 有关。因为我得到红色下划线超过大多数html代码内编写的react组件。当我把我的光标放在突出显示,我得到:

JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.ts(7026)
Cannot find module 'react/jsx-runtime' or its corresponding type declarations.ts(2307)

当我尝试运行我的应用程序时,我在终端中得到这个错误:

npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path C:\Users\app-name\node_modules\@esbuild\win32-x64\esbuild.exe
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\app-name\node_modules\@esbuild\win32-x64\esbuild.exe'
npm ERR!  [Error: EPERM: operation not permitted, unlink 'C:\Users\app-name\node_modules\@esbuild\win32-x64\esbuild.exe'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'C:\\Users\\app-name\\node_modules\\@esbuild\\win32-x64\\esbuild.exe'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Local\npm-cache\_logs\2023-02-21T02_16_43_812Z-debug-0.log
[mf:err] BuildError [4294963248]: Build failed with exit code 4294963248
    at ChildProcess.<anonymous> (C:\Users\app-name\node_modules\@miniflare\core\src\plugins\build.ts:77:25)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.emit (node:domain:475:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
BuildError [4294963248]: Build failed with exit code 4294963248
    at ChildProcess.<anonymous> (C:\Users\app-name\node_modules\@miniflare\core\src\plugins\build.ts:77:25)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.emit (node:domain:475:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
ERROR: "dev:miniflare" exited with 1.

我已经做了从删除node_modules文件夹到npm i --save-dev @types/nodenpm cache clean --force这样的命令的所有事情。似乎没有什么能永久解决这个问题。

nnsrf1az

nnsrf1az1#

这可能是由于windows的权限问题
1.关闭正在编辑源代码的编辑器
1.使用windows命令行运行npm安装

相关问题