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.
Related
After upgrading our RN app to RN 0.68, we are getting errors with the release build:
FATAL EXCEPTION: create_react_context
Process: com.app, PID: 15057
java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
The app works fine in development, and was fine before upgrading. It is using Hermes, but not using the new Fabric architecture.
When building the APK and then looking into its content, we can see that the bundle is not copied. But it is correctly built in the intermediate artifacts:
$ ./gradlew assembleRelease
…
BUILD SUCCESSFUL in 45s
1050 actionable tasks: 14 executed, 1036 up-to-date
$ unzip -l app/build/outputs/apk/release/app-arm64-v8a-release.apk | grep bundle
<nothing>
$ ls -l app/build/outputs/apk/release/app-arm64-v8a-release.apk
-rw-r--r-- 1 renchap staff 15618010 Apr 12 21:03 app/build/outputs/apk/release/app-arm64-v8a-release.apk
$ find . -name "index.android.bundle"
./app/build/generated/assets/react/release/index.android.bundle
./app/build/intermediates/merged_assets/release/out/index.android.bundle
./app/build/intermediates/merged_assets/release/mergeReleaseAssets/out/index.android.bundle
./app/build/intermediates/assets/release/index.android.bundle
$ ls -lh ./app/build/intermediates/assets/release/index.android.bundle
-rw-r--r-- 1 renchap staff 11M Apr 12 19:48 ./app/build/intermediates/assets/release/index.android.bundle
I am suspecting that there is a missing build step and it is not copied to the final directory, but I am not familiar enough with Gradle or RN's build process to check this.
Do you have any idea of what can cause this, or where to look at to troubleshoot this?
Found it after comparing the build files with a brand new RN app!
I had
classpath("com.android.tools.build:gradle:7.1.2")
in android/build.gradle
But with RN 0.68, you need to depend exactly on version 7.0.4, otherwise the JS bundle is not copied into the final APK.
The release APK is now working after switching to
classpath("com.android.tools.build:gradle:7.0.4")
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
I am going to show IP camera real-time on the mobile app.
So I downloaded Oney's RCTWebRTCDemo from GitHub to run it.
I did the following works.
Bians-iMac:MyHome byz$ git clone https://github.com/oney/RCTWebRTCDemo.git
Cloning into 'RCTWebRTCDemo'...
remote: Counting objects: 359, done.
remote: Total 359 (delta 0), reused 0 (delta 0), pack-reused 359
Receiving objects: 100% (359/359), 456.78 KiB | 303.00 KiB/s, done.
Resolving deltas: 100% (155/155), done.
Bians-iMac:MyHome byz$ cd RCTWebRTCDemo
Bians-iMac:RCTWebRTCDemo byz$ npm install
npm WARN deprecated connect#2.30.2: connect 2.x series is deprecated
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm notice created a lockfile as package-lock.json. You should commit this file.
added 592 packages from 409 contributors and audited 5796 packages in 434.447s
found 24 vulnerabilities (13 low, 3 moderate, 8 high)
run `npm audit fix` to fix them, or `npm audit` for details
Bians-iMac:RCTWebRTCDemo byz$ npm audit fix
> fsevents#1.2.4 install /Volumes/STUDY/Work/MyHome/RCTWebRTCDemo/node_modules/fsevents
> node install
[fsevents] Success: "/Volumes/STUDY/Work/MyHome/RCTWebRTCDemo/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm WARN react-native#0.56.0 requires a peer of react#16.4.1 but none is installed. You must install peer dependencies yourself.
+ react-native#0.56.0
added 407 packages from 157 contributors, removed 196 packages, updated 72 packages and moved 3 packages in 59.949s
fixed 20 of 24 vulnerabilities in 5796 scanned packages
1 package update for 4 vulns involved breaking changes
(use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)
Bians-iMac:RCTWebRTCDemo byz$ react-native link
Scanning folders for symlinks in /Volumes/STUDY/Work/MyHome/RCTWebRTCDemo/node_modules (9ms)
rnpm-install info Platform 'ios' module react-native-webrtc is already linked
rnpm-install info Linking react-native-webrtc android dependency
rnpm-install info Platform 'android' module react-native-webrtc has been successfully linked
Bians-iMac:RCTWebRTCDemo byz$ react-native run-android
Scanning folders for symlinks in /Volumes/STUDY/Work/MyHome/RCTWebRTCDemo/node_modules (11ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
File /Users/byz/.android/repositories.cfg could not be loaded.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':WebRTCModule'.
> Could not resolve all dependencies for configuration ':WebRTCModule:_debugPublishCopy'.
> Could not find com.android.support:appcompat-v7:26.1.0.
Searched in the following locations:
file:/Users/byz/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom
file:/Users/byz/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar
file:/Volumes/STUDY/Work/MyHome/RCTWebRTCDemo/android/sdk-manager/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar
Required by:
RCTWebRTCDemo:WebRTCModule:unspecified > com.facebook.react:react-native:0.56.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 13.627 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Operating System: mac OS HighSierra 10.13.5
Android SDK: 23.0.2 & 26 installed.
Can anyone tell me how to fix this?
Thanks for your attention.
You might miss appcompat-v7:26.1.0 in your android sdk.
Try to change to 27.+. It might help!
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.
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.