npm run deploy failure - npm

This is a followup to my previous post -> Contract method is not found I am now attempting to pass npm run deploy however, it seems to be failing with the following.
//helper.testnet.near.org, file: ./out/main.wasm
An error occured
Error: ENOENT: no such file or directory, open './out/main.wasm'
at Object.openSync (fs.js:476:3)
at Object.readFileSync (fs.js:377:35)
at exports.deploy (/Users/User_Name/Desktop/nearTest/testVote/node_modules/near-cli/index.js:42:49)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.handler (/Users/User_Name/Desktop/nearTest/testVote/node_modules/near-cli/utils/exit-on-error.js:39:9) {
[stack]: "Error: ENOENT: no such file or directory, open './out/main.wasm'\n" +
' at Object.openSync (fs.js:476:3)\n' +
' at Object.readFileSync (fs.js:377:35)\n' +
' at exports.deploy (/Users/User_Name/Desktop/nearTest/testVote/node_modules/near-cli/index.js:42:49)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:93:5)\n' +
' at async Object.handler (/Users/User_Name/Desktop/nearTest/testVote/node_modules/near-cli/utils/exit-on-error.js:39:9)',
[message]: "ENOENT: no such file or directory, open './out/main.wasm'",
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: './out/main.wasm'
}```

If you are using create-near-app it expects, as this error suggests, that the generated binary be located at ./out/main.wasm. Currently there is a script, compile, and it creates a symbolic link from the binary to out/main.wasm, which either the debug or release. The following line in the script is hard coded to expect the name greeter.wasm.
`./build/${debug ? 'debug' : 'release'}/greeter.wasm`
So my guess is if you have renamed the project and it is silently failing. Until we fix this issue, try changing the above to the name of the generated wasm file.

Related

File missing/Wrong config. Metro Server for React Native

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

No such file or directory: webpackModuleMeta.json

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 using Pdf-node-creator for generating pdf in my node application, It was working fine in local environment , But in production I get the below Error

I dono why I am getting this error please help
Error message
[Error: ENOENT: no such file or directory, open 'C:\tmp\html-pdf-6364.pdf'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\tmp\html-pdf-6364.pdf'
}

Vue error when creating a project from Vue CLI

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 ?

TypeError: undefined is not a function, js engine: hermes

My React Native (0.66.3) app today pops up an error with a stable code which hasn't had any change for quite some time. It is on macOS Big Sur. Here is the error:
ERROR TypeError: undefined is not a function, js engine: hermes
Error: ENOENT: no such file or directory, open '/Users/macair/Documents/code/js/xyz_app5/http:/localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.xyz-app5'
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at getCodeFrame (/Users/macair/Documents/code/js/xyz_app5/node_modules/metro/src/Server.js:919:18)
at Server._symbolicate (/Users/macair/Documents/code/js/xyz_app5/node_modules/metro/src/Server.js:992:22)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Server._processRequest (/Users/macair/Documents/code/js/xyz_app5/node_modules/metro/src/Server.js:403:7) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/macair/Documents/code/js/xyz_app5/http:/localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.xyz-app5'
}
Here is the error displayed on IOS simulator:
The error seems related to metro in React Native.
Reinstall node_modules
rm -rf node_modules
Clean your cache
yarn cache clean (or npm cache clean โ€“force)