简体   繁体   English

EOENT esprima esparse Windows 符号链接无效的目录文件未找到

[英]EOENT esprima esparse Windows symlinks invalid directory file not found

I'm taking over an outdated electron-webpack + react app, and my build is always getting this error:我正在接管一个过时的电子 webpack + react 应用程序,我的构建总是出现这个错误:

Cannot read file C:\\Users\\baz\\Desktop\\foo-bar-app\\node_modules\\esprima\\.bin\\esparse: Error: ENOENT: no such file or directory, open 'C:\\Users\\baz\\Desktop\\foo-bar-app\\node_modules\\esprima\\.bin\\esparse' at w (C:\\Users\\baz\\Desktop\\foo-bar-app\\node_modules\\app-builder-lib\\src\\asar\\asarUtil.ts:201:11) at writeStream.write (C:\\Users\\baz\\Desktop\\foo-bar-app\\node_modules\\app-builder-lib\\src\\asar\\asarUtil.ts:203:43) at afterWrite (_stream_writable.js:480:3) at onwrite (_stream_writable.js:471:7) at lazyFs.write (internal/fs/streams.js:304:5) at FSReqWrap.wrapper [as oncomplete] (fs.js:502:5) error Command failed with exit code 1.

I found that esprima creates symlinks to esparse in it's .bin folder, but trying to open the symlinks in explorer gives an "invalid directory" alert box, so I assume that is related to the ENOENT我发现 esprima 在它的 .bin 文件夹中创建了 esparse 的符号链接,但是尝试在资源管理器中打开符号链接会给出一个“无效目录”警告框,所以我认为这与 ENOENT 有关

Any clue how to resolve this?任何线索如何解决这个问题?

This may have something to do with yarn.这可能与纱线有关。 When I do a yarn install, it adds the symlinked .bin folder to the esprima package.当我进行 yarn 安装时,它会将符号链接的 .bin 文件夹添加到 esprima 包中。 An npm install doesn't. npm install 没有。 I deleted the node_modules folder, ran npm i , and then yarn dist , and all seemed well.我删除了 node_modules 文件夹,运行npm i ,然后运行yarn dist ,一切看起来都很好。

Let me know how this works for you!让我知道这对你有什么作用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 npm 安装中找不到 Esprima 错误 404 - Esprima error 404 Not Found in npm install 纱线:在 package.json 中将符号链接从“链接:”切换到“文件:”时出现“未找到清单”错误 - Yarn: "Manifest not found" error when switching symlinks from "link:" to "file:" in package.json 如何让 pnpm 对全局目录使用符号链接? - How to make pnpm use symlinks for a global directory? 找不到模块:错误:无法解析“文件”或“目录” ../../ - Module not found: Error: Cannot resolve 'file' or 'directory' ../../ 是否安装没有符号链接的npm本地模块目录? - Install npm local module directory without symlinks? VBox 共享文件夹中的符号链接的 Windows 问题 - Windows issue with symlinks in VBox shared folders Yeoman Generator错误-ENOENT:Windows上没有这样的文件或目录 - Yeoman generator error - ENOENT: no such file or directory on windows 为什么“yarn install”在安装 esparse 时会引发 ENOENT 错误? - Why does "yarn install" raise an ENOENT error when installing esparse? 尝试使用Browserify模块时出现esprima错误 - esprima error while trying to use the Browserify module 找不到模块:错误:无法解析'file'或'directory'./dist/qs.js - Module not found: Error: Cannot resolve 'file' or 'directory' ./dist/qs.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM