I got below error while trying to run my react-native app
Image of console (same content pasted below)
C:\My Projects\SmartBill\SmartBillApp>npx react-native run-windows --logging
i Verbose: ON
- Locating NuGet executableINFO: Could not find files for the given pattern(s).
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:90
+ ... lyContinue; Invoke-WebRequest https://dist.nuget.org/win-x86-commandl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId :
WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
× Locating NuGet executable
error Cannot read property 'toString' of undefined. Run CLI with --verbose flag for more details.
TypeError: Cannot read property 'toString' of undefined
at Object.runWindows [as func] (C:\My Projects\SmartBill\SmartBillApp\node_modules\react-native-windows\local-cli\runWindows\runWindows.js:67:61)
at process._tickCallback (internal/process/next_tick.js:68:7)
Related
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!
I'm following the "Your first extension" visual studio code guide, and after installing yo and generator-code with npm and running yo code I get this error
C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:347
throw err;
^
Error: Command failed: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption
The term 'Get-CimInstance' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:17
+ (Get-CimInstance <<<< -ClassName Win32_OperatingSystem).caption
+ CategoryInfo : ObjectNotFound: (Get-CimInstance:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
at makeError (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:338:15)
at windowsRelease (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\windows-release\index.js:39:19)
at osName (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\os-name\index.js:39:18)
at new Insight (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\node_modules\insight\lib\index.js:37:13)
at Object.<anonymous> (C:\Users\[My Name]\AppData\Roaming\npm\node_modules\yo\lib\cli.js:54:17)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
I really have no idea what to do so any help would be appriciated
Solved by updating from PowerShell v1.0 to PowerShell v5.1
I'm trying to run a react native app in expo, and after creating a blank app with expo init, when I cd into my project and do expo start, I get the following error:
events.js:282
throw er; // Unhandled 'error' event
^
Error: unable to resolve root /Users/myusername/Documents/native-app-name: failed to opendir(/Users/myusername/Documents/native-app-name): Operation not permitted
at BunserBuf.<anonymous> (/Users/myusername/Documents/native-app-name/node_modules/fb-watchman/index.js:95:23)
at BunserBuf.emit (events.js:305:20)
at BunserBuf.process (/Users/myusername/Documents/native-app-name/node_modules/bser/index.js:292:10)
at /Users/myusername/Documents/native-app-name/node_modules/bser/index.js:247:12
at processTicksAndRejections (internal/process/task_queues.js:79:11)
Emitted 'error' event on WatchmanWatcher instance at:
at Client.<anonymous> (/Users/myusername/Documents/native-app-name/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js:130:10)
at Client.emit (events.js:305:20)
at BunserBuf.<anonymous> (/Users/myusername/Documents/native-app-name/node_modules/fb-watchman/index.js:107:12)
at BunserBuf.emit (events.js:305:20)
at /Users/myusername/Documents/native-app-name/node_modules/bser/index.js:249:12
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
watchmanResponse: {
version: '4.7.0',
error: 'unable to resolve root /Users/myusername/Documents/native-app-name: failed to opendir(/Users/myusername/Documents/native-app-name): Operation not permitted'
}
}
Why might this be?
Try to move your project folder to a different place on your local. I just tried and worked for me.
I'm facing an error when building my titanium appcelerator application for android, below are modules installed :
- modules
Android > com.pushwoosh.module and dk.napp.drawer
tiapp.xml
<modules>
<module platform="iphone">dk.napp.drawer</module>
<module platform="android">dk.napp.drawer</module>
...
When i build the app, and run it from device i get following error :
[ERROR] : TiExceptionHandler: (main) [60613,103255] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [1,103256] - In ti:/module.js:303,2
[ERROR] : TiExceptionHandler: (main) [0,103256] - Message: Uncaught Error: Requested module not found: dk.napp.drawer
[ERROR] : TiExceptionHandler: (main) [0,103256] - Source: throw new Error("Requested module not found: " + request); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node?
[ERROR] : V8Exception: Exception occurred at ti:/module.js:303: Uncaught Error: Requested module not found: dk.napp.drawer
[ERROR] : ViewRootImpl: sendUserActionEvent() mView == null
So i don't know why the app doesn't found the dk.app.drawer module, here is a screenshot of all modules:
Thanks again for your helps
In the screenshot you only show the version 1.2.4 which is the iOS version. Did you add the android version too?
https://github.com/viezel/NappDrawer/tree/master/android/dist
I am trying to preview the app in MFP 8 CLI. But it throws the below error :
Any help would be appreciated.
{ Error: ERRGETSERVER
at generateError (C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\mfpdev
-cli\node_modules\mdo-errors\lib\index.js:31:23)
at Object.module.exports.getError (C:\Users\IBM_ADMIN\AppData\Roaming\npm\no
de_modules\mfpdev-cli\node_modules\mdo-errors\lib\index.js:25:10)
at readServerProfiles (C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\m
fpdev-cli\node_modules\mdo-server-support\lib\profileIO.js:157:28)
at C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modul
es\mdo-server-support\lib\profileIO.js:81:7
at _fulfilled (C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\mfpdev-cl
i\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_mo
dules\mfpdev-cli\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\IBM_ADMIN\AppData\Roaming\npm\n
ode_modules\mfpdev-cli\node_modules\q\q.js:796:13)
at C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modul
es\q\q.js:556:49
at runSingle (C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\mfpdev-cli
\node_modules\q\q.js:137:13)
at flush (C:\Users\IBM_ADMIN\AppData\Roaming\npm\node_modules\mfpdev-cli\nod
e_modules\q\q.js:125:13)
errno: 131,
code: 'ERRGETSERVER',
description: 'An error occurred during an attempt to read the server profiles.
' }