当我试图在我的码头集装箱上运行NPM时,偶然发现了这个错误。
FATAL EISDIR: illegal operation on a directory, read 19:05:13
at Object.readSync (node:fs:723:3)
at tryReadSync (node:fs:433:20)
at Object.readFileSync (node:fs:479:19)
at loadEnv (node_modules/@nuxt/config/dist/config.js:1152:78)
at Object.loadNuxtConfig (node_modules/@nuxt/config/dist/config.js:1070:15)
at loadNuxtConfig (node_modules/@nuxt/cli/dist/cli-index.js:338:32)
at NuxtCommand.getNuxtConfig (node_modules/@nuxt/cli/dist/cli-index.js:463:26)
at Object.run (node_modules/@nuxt/cli/dist/cli-start.js:115:30)
at NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:413:22)因此,在我的例子中,
只运行了fine....when,您尝试使用
npm run start运行应用程序,您可以看到上面的错误。
发布于 2021-12-25 06:28:12
不是这样的:
在同一目录或用户目录中运行root
.npmrc命令解决方案
将所有python虚拟环境文件夹添加到.dockerignore中--在我的示例中--我甚至没有将虚拟环境文件夹复制到我的docker容器中。它的存在是造成这一问题的原因。
示例
.dockerignore
/api/.env这很奇怪,我也不知道为什么这是happening...but,我花了几天的时间试图弄清楚为什么我的构建在部署时工作,但是不能在本地工作--在部署过程中,python虚拟环境被忽略了,所以在云构建期间它们从来没有出现过,这就是为什么它能够工作。
关于这个问题,这里有更多的资源,但这些资源对我来说并不适用:
https://stackoverflow.com/questions/70478342
复制相似问题