React Packager 0.44.0 - react-native

First of all I am new to react native platform and I am developing an app but I am facing one issue when I run my application after changes made in classes.
I am posting my logs below, Thank you for your help folks....
index.android.js (loads successfully but app do not run)
SyntaxError: Unexpected end of JSON input
at parse (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
SyntaxError: Unexpected end of JSON input
at parse (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
{
Error: write EPIPE
at _errnoException (util.js:1022:11)
at Socket._writeGeneric (net.js:767:25)
at Socket._write (net.js:786:8)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at Socket.Writable.write (_stream_writable.js:290:11)
at Socket.write (net.js:704:40)
at Socket.Writable.end (_stream_writable.js:553:10)
at Socket.end (net.js:496:31)
at Promise.resolve.then.then.then.catch.then.message
(E:\FinalDownload\takeawaymobileapp\node_modules\react-native\packager\src\Server\symbolicate\worker.js
:35:33) code: 'EPIPE', errno: 'EPIPE', syscall: 'write' }

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

Error: EISDIR: illegal operation on a directory, read using Tensorflow and Expo

I am using react-native Expo to build an app and I am trying to use tensorflow.
I tested the code in another (not react-native Expo) project and it worked great!
Unfortunately, in my Expo project it is not working.
The code is:
const threshold = 0.9;
const labelsToInclude = ['identity_attack', 'insult', 'threat'];
toxicity.load(threshold, labelsToInclude).then(model => {
model.classify(['you suck']).then(predictions => {
console.log(JSON.stringify(predictions))
});
});
The code is from: https://medium.com/tensorflow/text-classification-using-tensorflow-js-an-example-of-detecting-offensive-language-in-browser-e2b94e3565ce
I am getting this error:
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:592:3)
at tryReadSync (fs.js:366:20)
at Object.readFileSync (fs.js:403:19)
at UnableToResolveError.buildCodeFrameMessage (C:\Users\user\OneDrive\Desktop\n\KidGuard\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:347:17)
at new UnableToResolveError (C:\Users\user\OneDrive\Desktop\n\KidGuard\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:333:35)
at ModuleResolver.resolveDependency (C:\Users\user\OneDrive\Desktop\n\KidGuard\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:211:15)
at DependencyGraph.resolveDependency (C:\Users\user\OneDrive\Desktop\n\KidGuard\node_modules\metro\src\node-haste\DependencyGraph.js:413:43)
at C:\Users\user\OneDrive\Desktop\n\KidGuard\node_modules\metro\src\lib\transformHelpers.js:317:42
at C:\Users\user\OneDrive\Desktop\n\KidGuard\node_modules\metro\src\Server.js:1471:14
at Generator.next (<anonymous>)
right after the error I get this warning:
[Unhandled promise rejection: TypeError: undefined is not an object (evaluating 'environment_1.env().platform.fetch')]
Would love some help!

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)

Puppeteer script suddenly stopped working after upgrading Puppeteer

I have a puppeteer script I run to reboot my modem. It has worked for I guess about a year with no problem. 5 days ago it stopped working. I was looking into it and realized that I am getting errors I didn't used to get when running it and the script fails. The thing is I didn't change anything. As far as I can see, the HTML hasn't changed either yet it is failing. So I wonder if there is a bug in chromium or puppeteer or if it handles things differently somehow?
Here's a codepen with https://codepen.io/michaelbierman/pen/qQjdYR
HTML page
puppeteer script
errors
ERROR OUTPUT
Thursday 11/15/2018 11:14:04, Login...
Unhandled Rejection at: Promise (new page) Promise {
Error: No node found for selector: #id_username
at assert (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:278:11)
at Frame.type (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/FrameManager.js:771:5)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
-- ASYNC --
at Frame. (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:144:27)
at Page.type (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/Page.js:971:29)
at /Users/bierman/Documents/Applications/bin/arris/arristest.js:49:13
at
at process._tickCallback (internal/process/next_tick.js:188:7) } reason: Error: No node found for selector: #id_username
at assert (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:278:11)
at Frame.type (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/FrameManager.js:771:5)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
-- ASYNC --
at Frame. (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:144:27)
at Page.type (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/Page.js:971:29)
at /Users/bierman/Documents/Applications/bin/arris/arristest.js:49:13
at
at process._tickCallback (internal/process/next_tick.js:188:7)
/Users/bierman/Documents/Applications/bin/arris/arristest.js:29
browser.close();
^
ReferenceError: browser is not defined
at process.on (/Users/bierman/Documents/Applications/bin/arris/arristest.js:29:2)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emitPendingUnhandledRejections (internal/process/promises.js:108:22)
at process._tickCallback (internal/process/next_tick.js:189:7)
BigMac:bin michael$ /usr/local/bin/node /Users/bierman/Documents/Applications/bin/arris/arristest.js
Thursday 11/15/2018 11:20:29, Login...
Thursday 11/15/2018 11:20:36, Go to home...
Unhandled Rejection at: Promise (new page) Promise {
Error: No node found for selector: #alertExitButton
at assert (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:278:11)
at Frame.click (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/FrameManager.js:704:5)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
-- ASYNC --
at Frame. (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:144:27)
at Page.click (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/Page.js:932:29)
at /Users/bierman/Documents/Applications/bin/arris/arristest.js:62:13
at
at process._tickCallback (internal/process/next_tick.js:188:7) } reason: Error: No node found for selector: #alertExitButton
at assert (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:278:11)
at Frame.click (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/FrameManager.js:704:5)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
-- ASYNC --
at Frame. (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/helper.js:144:27)
at Page.click (/Users/bierman/Documents/Applications/bin/arris/node_modules/puppeteer/lib/Page.js:932:29)
at /Users/bierman/Documents/Applications/bin/arris/arristest.js:62:13
at
at process._tickCallback (internal/process/next_tick.js:188:7)
/Users/bierman/Documents/Applications/bin/arris/arristest.js:29
browser.close();
^
ReferenceError: browser is not defined
at process.on (/Users/bierman/Documents/Applications/bin/arris/arristest.js:29:2)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emitPendingUnhandledRejections (internal/process/promises.js:108:22)
at process._tickCallback (internal/process/next_tick.js:189:7)
Try this:
npm uninstall chromium
npm uninstall puppeteer
npm i chromium#1
npm i puppeteer