0

当我在 xcode 中运行 react native 项目时,出现以下错误。Metro bunlder 由于某种原因失败了。

这是在启动的终端窗口中显示的错误。

error ENOTDIR: not a directory, mkdir '/var/folders/h6/952khgzj1zncqsd5rdsdk5240000gn/T/metro-cache/00'. Run CLI with --verbose flag for more details.
Error: ENOTDIR: not a directory, mkdir '/var/folders/h6/952khgzj1zncqsd5rdsdk5240000gn/T/metro-cache/00'
    at Object.mkdirSync (fs.js:757:3)
    at Function.sync (/Users/aaaa/Documents/newton/connectedblue/node_modules/mkdirp/index.js:71:13)
    at FileStore._createDirs (/Users/aaaa/Documents/newton/connectedblue/node_modules/metro-cache/src/stores/FileStore.js:94:14)
    at new FileStore (/Users/aaaa/Documents/newton/connectedblue/node_modules/metro-cache/src/stores/FileStore.js:27:10)
    at getDefaultValues (/Users/aaaa/Documents/newton/connectedblue/node_modules/metro-config/src/defaults/index.js:164:5)
    at /Users/aaaa/Documents/newton/connectedblue/node_modules/metro-config/src/defaults/index.js:191:12
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/aaaa/Documents/newton/connectedblue/node_modules/metro-config/src/defaults/index.js:14:24)
    at _next (/Users/aaaa/Documents/newton/connectedblue/node_modules/metro-config/src/defaults/index.js:34:9)
    at /Users/aaaa/Documents/newton/connectedblue/node_modules/metro-config/src/defaults/index.js:39:7`

该项目过去可以正常工作,但没有运行失败。

4

1 回答 1

0

实际上,在创建错误消息中给出的目录后,它开始工作。

于 2019-07-29T09:45:29.003 回答