react native app crash after splash screen - android

I am new to React Native. I am created a new blank project in Expo XDE and when I'm trying to run it on my Android device every time it crash after splash screen. It's just a simple blank app.
There is no logs or errors. Expo app just return to first page.
Device: Android 7
XDE: Expo version 2.21.00
app.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Updated
npm start log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Pfn\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#5.5.1
3 info using node#v6.11.3
4 verbose stack Error: missing script: start
4 verbose stack at run (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\lib\run-script.js:151:19)
4 verbose stack at C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\lib\run-script.js:61:5
4 verbose stack at C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:115:5
4 verbose stack at C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:402:5
4 verbose stack at checkBinReferences_ (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:357:45)
4 verbose stack at final (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:400:3)
4 verbose stack at then (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:160:5)
4 verbose stack at ReadFileContext.<anonymous> (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:332:20)
4 verbose stack at ReadFileContext.callback (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16)
4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:367:13)
5 verbose cwd F:\react\my-new-project
6 verbose Windows_NT 10.0.15063
7 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Pfn\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
8 verbose node v6.11.3
9 verbose npm v5.5.1
10 error missing script: start
11 verbose exit [ 1, true ]
after adding this:
"scripts": {
"start": "node app.js"
}
to package.json log :
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Pfn\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#5.5.1
3 info using node#v6.11.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle my-new-project#0.0.0~prestart: my-new-project#0.0.0
6 info lifecycle my-new-project#0.0.0~start: my-new-project#0.0.0
7 verbose lifecycle my-new-project#0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle my-new-project#0.0.0~start: PATH: C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;F:\react\my-new-project\node_modules\.bin;C:\Program Files\Expo XDE\resources\app\node_modules\xdl\binaries\windows\adb;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files\PuTTY\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Users\Pfn\AppData\Roaming\npm;C:\Users\Pfn\AppData\Local\Microsoft\WindowsApps;C:\Users\Pfn\AppData\Roaming\Composer\vendor\bin;C:\Users\Pfn\AppData\Roaming\npm
9 verbose lifecycle my-new-project#0.0.0~start: CWD: F:\react\my-new-project
10 silly lifecycle my-new-project#0.0.0~start: Args: [ '/d /s /c', 'node app.js' ]
11 silly lifecycle my-new-project#0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle my-new-project#0.0.0~start: Failed to exec start script
13 verbose stack Error: my-new-project#0.0.0 start: `node app.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Pfn\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:920:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
14 verbose pkgid my-new-project#0.0.0
15 verbose cwd F:\react\my-new-project
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Pfn\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v6.11.3
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error my-new-project#0.0.0 start: `node app.js`
22 error Exit status 1
23 error Failed at the my-new-project#0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
update2:
npm install warnings :
npm WARN react-native-branch#2.0.0-beta.3 requires a peer of react#>=15.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-gesture-handler#1.0.0-alpha.28 requires a peer of react#> 15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sshpk#1.13.0 (node_modules\fsevents\node_modules\sshpk):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'F:\react\my-new-project\node_modules\fsevents\node_modules\sshpk' -> 'F:\react\my-new-project\node_modules\fsevents\node_modules\.sshpk.DELETE'
added 5 packages and updated 2 packages in 70.53s

Which OS? Mac, Win, or Linux? If you're on Linux, did you open the XDE client using this command?
On Linux, open with chmod a+x xde*.AppImage and ./xde*.AppImage
Regardless of your OS, are you sure you have...
the latest version of node installed?
the latest version of watchman installed?
A shot in the dark, but once you've updated the above, I would start a new project and try again.
UPDATE: Looking more closely at your logs, I can see you're on Windows since the paths are "C:\...", so ignore the linux comment above. I still think your environment isn't setup correctly though. Reinstalling node and/or watchman may help (most likely node). You might also try installing yarn and see if that makes a difference. Sometimes it does for me.

Related

How can i build Miscord on aarch64?

I am trying to build Miscord from source
(https://github.com/miscord/miscord/archive/v5.0.4.tar.gz)
on aarch64(my phone). root#kali is a Chroot enviorment on my phone. I have tested other distros((debian&ubuntu)aarch64) but no success as well. On PC amd64 starts no problem.
This is how i tried to start it. Posted the log at the bottom.
Thanks in advance!
npm was installed with
apt get install npm
Here is the commands i run:
root#kali:/home/kali/Miscdord# cd miscord-5.0.4/
root#kali:/home/kali/Miscdord/miscord-5.0.4# ls
CHANGELOG.md Dockerfile package.json tsconfig.json
CODE_OF_CONDUCT.md Dockerfile.beta package-lock.json tslint.json
config.example.json Dockerfile.dev README.md
CONTRIBUTING.md LICENSE.md src
dist node_modules static
root#kali:/home/kali/Miscdord/miscord-5.0.4# npm install
> miscord#5.0.4 prepare
> npm run clean && npm run compile
> miscord#5.0.4 clean
> shx rm -rf dist/
> miscord#5.0.4 compile
> tsc
up to date, audited 518 packages in 5m
10 vulnerabilities (5 low, 1 moderate, 4 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
root#kali:/home/kali/Miscdord/miscord-5.0.4# npm start
> miscord#5.0.4 start
> npm run prepare && node dist/bin/index.js
> miscord#5.0.4 prepare
> npm run clean && npm run compile
> miscord#5.0.4 clean
> shx rm -rf dist/
> miscord#5.0.4 compile
> tsc
Miscord should not be run with root permissions.
If running without sudo doesn't work, you can either fix your permission problems or change where npm stores global packages by putting ~/npm/bin in your PATH and running:
npm config set prefix ~/npm
See: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
If you really need to run Miscord with sudo, add parameter --runningWithSudoIsDangerous.
npm ERR! code 77
npm ERR! path /home/kali/Miscdord/miscord-5.0.4
npm ERR! command failed
npm ERR! command sh -c npm run prepare && node dist/bin/index.js
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-28T22_36_22_637Z-debug.log
Here is the log:
0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
1 info using npm#7.0.3
2 info using node#v12.19.0
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/usr/share/npm/npmrc Completed in 3ms
5 timing config:load:builtin Completed in 3ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/home/kali/Miscdord/miscord-5.0.4/.npmrc Completed in 1ms
9 timing config:load:project Completed in 3ms
10 timing config:load:file:/root/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 14ms
19 verbose npm-session 1d677a5bd581f35b
20 timing npm:load Completed in 26ms
21 timing command:run-script Completed in 250435ms
22 timing command:start Completed in 250438ms
23 verbose stack Error: command failed
23 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/#npmcli/promise-spawn/index.js:63:27)
23 verbose stack at ChildProcess.emit (events.js:314:20)
23 verbose stack at maybeClose (internal/child_process.js:1021:16)
23 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
24 verbose pkgid miscord#5.0.4
25 verbose cwd /home/kali/Miscdord/miscord-5.0.4
26 verbose Linux 4.14.117-perf+
27 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
28 verbose node v12.19.0
29 verbose npm v7.0.3
30 error code 77
31 error path /home/kali/Miscdord/miscord-5.0.4
32 error command failed
33 error command sh -c npm run prepare && node dist/bin/index.js
34 verbose exit 77

ERR! code ELIFECYCLE while running npm start

I've run npm start, npm run start, sudo npm start and sudo npm run start, yarn start, sudo yarn start and am getting the same error:
Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: A non-recoverable condition has triggered. Watchman needs your help!
The triggering condition was at timestamp=1507837337: inotify-add-watch(/home/mohammad/foobar_react_native/node_modules/is-arrayish) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem. You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
ERROR A non-recoverable condition has triggered. Watchman needs your help!
The triggering condition was at timestamp=1507837337: inotify-add-watch(/home/mohammad/foobar_react_native/node_modules/is-arrayish) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem. You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch
Loading dependency graph...npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR! foobar_react_native#0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 11
npm ERR!
npm ERR! Failed at the foobar_react_native#0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mohammad/.npm/_logs/2017-10-12T19_42_19_386Z-debug.log
and here is the debug log:
cat /home/mohammad/.npm/_logs/2017-10-12T19_43_55_751Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'start' ]
2 info using npm#5.4.2
3 info using node#v8.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle foobar_react_native#0.0.1~prestart: foobar_react_native#0.0.1
6 info lifecycle foobar_react_native#0.0.1~start: foobar_react_native#0.0.1
7 verbose lifecycle foobar_react_native#0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle foobar_react_native#0.0.1~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/mohammad/foobar_react_native/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle foobar_react_native#0.0.1~start: CWD: /home/mohammad/foobar_react_native
10 silly lifecycle foobar_react_native#0.0.1~start: Args: [ '-c',
10 silly lifecycle 'node node_modules/react-native/local-cli/cli.js start' ]
11 silly lifecycle foobar_react_native#0.0.1~start: Returned: code: 11 signal: null
12 info lifecycle foobar_react_native#0.0.1~start: Failed to exec start script
13 verbose stack Error: foobar_react_native#0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
13 verbose stack Exit status 11
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid foobar_react_native#0.0.1
15 verbose cwd /home/mohammad/foobar_react_native
16 verbose Linux 4.10.0-32-generic
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "start"
18 verbose node v8.5.0
19 verbose npm v5.4.2
20 error code ELIFECYCLE
21 error errno 11
22 error foobar_react_native#0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
22 error Exit status 11
23 error Failed at the foobar_react_native#0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 11, true ]
How can I fix this?
I've tried rm -rf node_modules && npm install.
I've tried
watchman watch-del-all
watchman shutdown-server
Here is my project directory:
drwxrwxr-x 9 mohammad mohammad 4096 Oct 12 15:49 .
drwxr-xr-x 48 mohammad mohammad 4096 Oct 12 00:47 ..
drwxrwxr-x 7 mohammad mohammad 4096 Oct 12 01:24 android
-rw-rw-r-- 1 mohammad mohammad 1164 Oct 12 00:47 App.js
-rw-rw-r-- 1 mohammad mohammad 75 Oct 12 00:47 app.json
-rw-rw-r-- 1 mohammad mohammad 34 Oct 12 00:47 .babelrc
-rw-rw-r-- 1 mohammad mohammad 114 Oct 12 00:47 .buckconfig
-rw-rw-r-- 1 mohammad mohammad 1445 Oct 12 00:47 .flowconfig
drwxrwxr-x 2 mohammad mohammad 4096 Oct 12 01:08 gen
drwxrwxr-x 8 mohammad mohammad 4096 Oct 12 15:42 .git
-rw-rw-r-- 1 mohammad mohammad 16 Oct 12 00:47 .gitattributes
-rw-rw-r-- 1 mohammad mohammad 763 Oct 12 00:47 .gitignore
drwxrwxr-x 3 mohammad mohammad 4096 Oct 12 15:30 .idea
-rw-rw-r-- 1 mohammad mohammad 135 Oct 12 00:47 index.js
drwxrwxr-x 7 mohammad mohammad 4096 Oct 12 00:47 ios
drwxrwxr-x 575 mohammad mohammad 20480 Oct 12 15:49 node_modules
-rw-rw-r-- 1 mohammad mohammad 450 Oct 12 15:49 package.json
-rw-rw-r-- 1 mohammad mohammad 209155 Oct 12 15:49 package-lock.json
drwxrwxr-x 2 mohammad mohammad 4096 Oct 12 00:47 __tests__
-rw-rw-r-- 1 mohammad mohammad 2 Oct 12 00:47 .watchmanconfig
-rw-rw-r-- 1 mohammad mohammad 157444 Oct 12 00:47 yarn.lock
watchman version: 4.7.0
react-native versions:
react-native-cli: 2.0.1
react-native: 0.49.3
.watchmanconfig file:
{}
Can anyone tell me how to fix it?
Resolved by running:
sudo npm install -g watchman
sudo npm run start

Unable to install npm packages into nativescript project (..after installing nativescript-nodeify?)

I'm encountering a problem which gives me headache for hours already. I am working on a mobile app which I am developing in a nativescript environment. As my app needs to decode JSON Web Tokens for login purposes I tried to install the npm jsonwebtoken-package, which seems not to be compatible with nativescript. After some google I found the 'nativescript-nodeify'-plugin which I installed via
tns plugin add nativescript-nodeify
After that everything seemed to work fine but later on I tried to install another package, which gave me the following error:
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "nativescript-nodeify/node_modules/string_decoder": name can only contain URL-friendly characters
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jonas/.npm/_logs/2017-10-06T16_24_33_241Z-debug.log
This is the content of the log-file:
0 info it worked if it ends with ok
1 verbose cli [ '/home/jonas/.nvm/versions/node/v6.11.3/bin/node',
1 verbose cli '/home/jonas/.nvm/versions/node/v6.11.3/bin/npm',
1 verbose cli 'install',
1 verbose cli 'file-system',
1 verbose cli '--save' ]
2 info using npm#5.4.2
3 info using node#v6.11.3
4 verbose npm-session d7333b71d2cd0141
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/file-system 216ms (from cache)
8 silly pacote tag manifest for file-system#latest fetched in 238ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule file-system#2.2.2 checking installable status
14 http fetch GET 304 https://registry.npmjs.org/utils-extend 164ms (from cache)
15 silly pacote range manifest for utils-extend#^1.0.4 fetched in 166ms
16 silly resolveWithNewModule utils-extend#1.0.8 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/file-match 171ms (from cache)
18 silly pacote range manifest for file-match#^1.0.1 fetched in 172ms
19 silly resolveWithNewModule file-match#1.0.2 checking installable status
20 verbose stack Error: Invalid package name "nativescript-nodeify/node_modules/string_decoder": name can only contain URL-friendly characters
20 verbose stack at invalidPackageName (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:71:15)
20 verbose stack at Object.Result.setName (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:107:11)
20 verbose stack at Object.Result (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:96:23)
20 verbose stack at Function.resolve (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:45:15)
20 verbose stack at childDependencySpecifier (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/lib/install/deps.js:81:14)
20 verbose stack at addDependency (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/lib/install/deps.js:532:15)
20 verbose stack at /home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/lib/install/deps.js:482:5
20 verbose stack at /home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
20 verbose stack at Array.forEach (native)
20 verbose stack at /home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
20 verbose stack at Array.forEach (native)
20 verbose stack at asyncMap (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
20 verbose stack at loadDeps (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/lib/install/deps.js:474:3)
20 verbose stack at Array.<anonymous> (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
20 verbose stack at LOOP (/home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
20 verbose stack at /home/jonas/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
21 verbose cwd /home/jonas/Dokumente/Telemedizin-Bachelorarbeit-JF/medicalIM
22 verbose Linux 4.4.0-42-generic
23 verbose argv "/home/jonas/.nvm/versions/node/v6.11.3/bin/node" "/home/jonas/.nvm/versions/node/v6.11.3/bin/npm" "install" "file-system" "--save"
24 verbose node v6.11.3
25 verbose npm v5.4.2
26 error code EINVALIDPACKAGENAME
27 error Invalid package name "nativescript-nodeify/node_modules/string_decoder": name can only contain URL-friendly characters
28 verbose exit [ 1, true ]
I tried to uninstall nativescript-nodeify via
tns plugin remove nativescript-nodeify
which seems also to use the npm-command and fails:
Command failed: npm uninstall nativescript-nodeify --save
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "util/util.js": name can only contain URL-friendly characters
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jonas/.npm/_logs/2017-10-06T16_01_14_047Z-debug.log
I went back a few commits (before I installed nodeify) and the npm install command works as expected.
As I need these packages in my project, it would be awesome if somebody has got a solution to get nativescript-nodeify working properly or an alternative to it.
Thank you in advance ;)
will i have the same problem.
you have to delete all node-module and reinstall it each time you have this problem.
it's too bad solution but till now it's the only solution.

ionic build error code 137

I am trying to build my app for android. It built fine for the first time but there were some typos in first so i edited the html and now i am trying to build the app. It is giving an error with exit status 137. the nodejs is latest so is the npm. I have checked the memory approx 700mb available.
New to ionic so now i cannot figure out the mistake.
Also rebuilded the node-sass. Nothing is working.
it takes too much time after sass started and then gets killed automatically.
Attaching the debug file
14 verbose stack Exit status 137
14 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ionic-hello-world#
16 verbose cwd /home/ubuntu/files/ic2017app
17 verbose Linux 4.4.0-64-generic
18 verbose argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "ionic:build" "--" "--v2"
19 verbose node v6.10.1
20 verbose npm v4.4.4
21 error code ELIFECYCLE
22 error errno 137
23 error ionic-hello-world# ionic:build: `ionic-app-scripts build "--v2"`
23 error Exit status 137
24 error Failed at the ionic-hello-world# ionic:build script 'ionic-app-scripts build "--v2"'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the ionic-hello-world package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error ionic-app-scripts build "--v2"
24 error You can get information on how to open an issue for this project with:
24 error npm bugs ionic-hello-world
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls ionic-hello-world
24 error There is likely additional logging output above.
25 verbose exit [ 137, true ]
700 mb is not enough. Recheck again. It must will be a memory overflow error.

"android list targets" launches emulator

I am trying to create new project using
cordova platform add android
But running this command launches android emulator and after I close the emulator I get the message
C:\devCenter\project\new_app>cordova platform add android
Creating android project...
C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:126
throw e;
^
Error: Please install Android target "android-19".
Hint: Run "android" from your command-line to open the SDK manager.
at C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\lib\check_reqs.js:174:19
at _fulfilled (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:798:54)
at self.promiseDispatch.done (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:827:30)
at Promise.promise.promiseDispatch (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:7
at C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:574:44
at flush (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:442:13)
Error: cmd: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\think ahead\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)
I have installed API-19 in SDK manager. So I checked check_reqs.js and found command that finds the API version number is
android list targets
When I execute this command, android emulator launches and dont get the list which is expected, here the output:
C:\devCenter\project\new_app>android list targets
OSALSockMap::init: sock_map=0x003F0000
start /SocketeQ/windowsandroid_root//system/bin/plogd ... 2528
C:\devCenter\project\new_app>start /SocketeQ/windowsandroid_root//system/bin/socketbinder ... 5648
add (socketbinder, 0) to sockmap ok
start /SocketeQ/windowsandroid_root//system/bin/servicemanager ... 10164
[ on init ]
[ on boot ]
[ service netd ]
[ service vold ]
[ service surfaceflinger ]
[ service ril-daemon ]
[ service zygote ]
[ service media ]
[ service drm ]
[ service installd ]
reference-ril requires: -p <tcp port> or -d /dev/tty_device
android-start was killed
app_process was killed
servicemanager was killed
socketbinder was killed
Could not open pipe: 2 second wait timed out.Could not open pipe: 2 second wait timed out.Could not open pipe: 2 second wait timed out.Cou
surfaceflinger was killed
instld was killed
no process 'alogd' was killed
plogd was killed
netd was killed
vold was killed
bootanimation was killed
rild was killed
no process 'drmserver' was killed
It seems like I have messed up my environment show how. Do anyone know what the problem might be?
Here is the solution, check if there is any other android development tool. Like in my case I had appcelerator installed which was in a way messing up the environment. Once removed whole thing worked like a charm. If there is any need to user multiple development platform, my suggestion is to use different partitions.

Categories

Resources