syscall such related rejection open not error err enoentnpm code being able node.js npm avisynth

node.js - related - save error enoent no such file or directory open ''/ package json



errno: 34, código: ''ENOENT'' (1)

Verifica tu camino. Si estuviera haciendo varios niveles de directorios, generalmente obtendrá esto.

Por ejemplo. si necesita mkdir (''public / projects''), asegúrese de mkdir (''public'') primero y luego mkdir (''public / projects'')

Solo algunos ejemplos de scripts para la demostración:

var fs = require(''fs''); var f = ''/css/colors''; var dirs = f.split(''/''); var newDir = __dirname; for (var i = 0; i < dirs.length; i++) { newDir += dirs[i] + ''/''; console.log(newDir); if (!fs.exists(newDir)) { fs.mkdir(newDir, function(error) { console.log(error); }) } }

Traté de ejecutar mi proyecto, pero me dio el error ENOENT en algún lugar en el camino. Sí, he visto esta pregunta similar , pero su solución no funciona para mí.

PROJECTS.JS::CREATED 542a78fcaa50f4260d1e52a5 { [Error: ENOENT, mkdir ''/home/haint/avs3_tmp/html5-videoEditor-master/modules/.. /public/projects/ca62a6012db5454fb0ba41d35f61afe6''] errno: 34, code: ''ENOENT'', path: ''/home/haint/avs3_tmp/html5-videoEditor-master/modules/../public/projects /ca62a6012db5454fb0ba41d35f61afe6'' } { [Error: ENOENT, mkdir ''/home/haint/avs3_tmp/html5-videoEditor-master/modules/.. /public/projects/ca62a6012db5454fb0ba41d35f61afe6/assets/''] errno: 34, code: ''ENOENT'', path: ''/home/haint/avs3_tmp/html5-videoEditor-master/modules/../public/projects /ca62a6012db5454fb0ba41d35f61afe6/assets/'' } { [Error: ENOENT, mkdir ''/home/haint/avs3_tmp/html5-videoEditor-master/modules/.. /public/projects/ca62a6012db5454fb0ba41d35f61afe6/compositions/''] errno: 34, code: ''ENOENT'', path: ''/home/haint/avs3_tmp/html5-videoEditor-master/modules/../public/projects /ca62a6012db5454fb0ba41d35f61afe6/compositions/'' } PROJECTS.JS::FOUND 542a78fcaa50f4260d1e52a5 PROJECTS.JS::LIBRARY SERVED WITH 0 ASSETS PROJECTS.JS::COMPOSITIONS SERVED WITH 0 COMPS.

Cómo puedo arreglarlo