After I create a Vue3 project with the Vue cli tool, my terminal crashes and gives the following error:
🚀 Starting GUI...
🌠Ready on http://localhost:8000
node:events:368
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, scandir '/Users/xxxx/Desktop/personal/vuetest/node_modules/#vue/cli-service/locales'
at Object.readdirSync (node:fs:1390:3)
at exports.readdir (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
at Object.safeCall [as safe] (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/call.js:24:8)
at DirectoryReader.readNextDirectory (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
at Readable.DirectoryReader.stream._read (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
at Readable.read (node:internal/streams/readable:496:27)
at readdirSync (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
at Function.readdirSyncStat (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/index.js:34:10)
at ReaderSync.dynamicApi (/usr/local/lib/node_modules/#vue/cli/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
at ReaderSync.api (/usr/local/lib/node_modules/#vue/cli/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/Users/xxxx/Desktop/personal/vuetest/node_modules/#vue/cli-service/locales'
}
Node.js v17.0.1
I cannot start the cli again until I delete the project folder. What is the problem here ?
Related
I'm running a react native app in actual physical device using Metro server app is running fine but I'm see this error in logs.
Error: ENOENT: no such file or directory, open '/home/user/Workspace/mobile/http:/localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.company&modulesOnly=false&runModule=true'
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at getCodeFrame (/home/user/Workspace/mobile/node_modules/metro/src/Server.js:919:18)
at Server._symbolicate (/home/user/Workspace/mobile/node_modules/metro/src/Server.js:992:22)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Server._processRequest (/home/user/Workspace/mobile/node_modules/metro/src/Server.js:403:7) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/user/Workspace/mobile/http:/localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.company&modulesOnly=false&runModule=true'
}
it seems a path issue but not able to find where to make changes for this
I'm working on a Vue project and I've upgraded webpack from v4 to v5 and I encountered this error when running the app:
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: ENOENT: no such file or directory, open '/Users/mihai/work/ravedev/alertweb/src/frontend/dist/static/webpackModuleMeta.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/mihai/work/ravedev/alertweb/src/frontend/dist/static/webpackModuleMeta.json'
}
It says that webpack compiled successfully, but I'm not sure what might have caused this issue.
I have trouble with constructing a vue.js project by using npm or yarn.
the cmd: $ vue init webpack my-project
# Installing project dependencies ...
# ========================
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn C:\WINDOWS\system32\cmd.exe; ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\WINDOWS\\system32\\cmd.exe;',
path: 'C:\\WINDOWS\\system32\\cmd.exe;',
spawnargs: [ '-c', 'yarn install' ]
}
the picture
I'm trying to set up react native on my machine and when running yarn run install-pods I get the following error.
$ ./cli.js installPods
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn pod ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn pod',
path: 'pod',
spawnargs: [ 'install', '--project-directory=./hosts/native/ios' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
musketeer % yarn run install-pods
yarn run v1.17.3
$ ./cli.js installPods
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn pod ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn pod',
path: 'pod',
spawnargs: [ 'install', '--project-directory=./hosts/native/ios' ]
}
error Command failed with exit code 1.
Try Running
npx react-native doctor
and it will show all common errors and try to fix them automatically
An error will get generated when running:
vue ui
vue ui
🚀 Starting GUI...
🌠Ready on http://localhost:8001
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd.exe',
path: 'cmd.exe',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:8001' ]
}
Expected to get an app running on port localhost:8001, but the above error gets generated.
The reason is because it is trying to open a browser window from inside WSL terminal.
Instead, do the following:
vue ui --headless
This will avoid running the cmd.exe to open a browser and instead run the app on port 8001. You'll have to open a browser manually to http://localhost:8001