vite:build-html EISDIR: 针对目录的非法操作,读取

huangapple go评论56阅读模式
英文:

vite:build-html EISDIR: illegal operation on a directory, read

问题

**[vite:build-html] EISDIR: illegal operation on a directory, read**
file: C:/Users/hgale/alexanderhdev/Hiddal/hiddal.com/index.html
**error during build:
Error: EISDIR: illegal operation on a directory, read**
英文:

`npm run build

> hiddal.com@0.0.0 build
> vite build

vite v4.1.1 building for production...
✓ 0 modules transformed.
[vite:build-html] EISDIR: illegal operation on a directory, read
file: C:/Users/hgale/alexanderhdev/Hiddal/hiddal.com/index.html
error during build:
Error: EISDIR: illegal operation on a directory, read

I still couldn't find solutions because I can't understand the error`

答案1

得分: 1

EISDIR 意味着错误是一个目录。这意味着你的代码试图将目录当作文件来运行。这可能有很多意思。
也许你正在尝试导入一个目录的 index.js 文件,例如:
import concatenate from "@/helpers"

你是否从 "hiddal.com" 导入任何东西?如果是这样,我建议尝试显式导入 index.html 文件。

英文:

EISDIR means Error is a Directory. It means your code is trying to run a directory as a file. That can mean a lot of things.
Maybe you're trying to import a directory's index.js file, for example:
import concatenate from "@/helpers".

Are you importing anything from "hiddal.com" ? If so, I would try explicitly importing the index.html file.

答案2

得分: 0

之前,当我使用"npm run build"部署tailwindcss的HTML文件时,我遇到了这个错误。这只是一个简单的文件目标或不完整的URL目标错误,出现在img/video标签的src属性之间。所以,只需删除img/video标签(如果需要的话),或者用适当的文件路径替换它。

正如你在第1055行提供的不完整URL所示

我遇到的错误如下

英文:

Earlier, When I'm deploying the tailwindcss Html file using "npm run build" , I got this error and It is a simple file destination or incomplete url destination error in between src of img/video tags. So, just remove img/video tag(If necessary) or replace with appropriate file path.

As you can see there i provided a incomplete url at line:1055

And error i got

huangapple
  • 本文由 发表于 2023年2月18日 20:50:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75493462.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定