英文:
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标签(如果需要的话),或者用适当的文件路径替换它。
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论