Tuesday, 16 May 2017

npm ERR node V, npm ERR npm V running an android app with ionic on Windows

I have a problem with running a program via ionic. I installed everything that is needed and tried to emulate an android test app, and it worked without any problems But if I try to start the program of my colleague:

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:build" "--"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

These errors occur and we're confused what that means. He developed this app on a Linux machine, and if he's starting the app on his machine, it works. I'm using a Windows machine. Could that be something, that is responsible for our problem? We both have the same node/npm version. I use the "ionic run android" command, to start the app.

And btw. the full error logs, if it helps:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'ionic:build',
1 verbose cli   '--' ]
2 info using npm@4.2.0
3 info using node@v7.10.0
4 verbose run-script [ 'preionic:build', 'ionic:build', 'postionic:build' ]
5 info lifecycle hnwApp@~preionic:build: hnwApp@
6 silly lifecycle hnwApp@~preionic:build: no script for preionic:build, continuing
7 info lifecycle hnwApp@~ionic:build: hnwApp@
8 verbose lifecycle hnwApp@~ionic:build: unsafe-perm in lifecycle true
9 verbose lifecycle hnwApp@~ionic:build: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\dev\papp\app\node_modules\.bin;C:\Users\entwickler\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Lenovo\Touch Fingerprint Software\;C:\Program Files (x86)\Common Files\Lenovo;C:\ProgramData\Lenovo\ReadyApps;C:\Program Files\OpenVPN\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;%JAVA_HOME%\bin;C:\Program Files\apache-ant-1.10.1\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;C:\Program Files\Git\cmd;C:\Gradle\gradle-3.5\bin;C:\Program Files\nodejs\;C:\Users\entwickler\AppData\Local\Microsoft\WindowsApps;C:\Users\entwickler\AppData\Roaming\npm
10 verbose lifecycle hnwApp@~ionic:build: CWD: C:\dev\papp\app
11 silly lifecycle hnwApp@~ionic:build: Args: [ '/d /s /c', 'ionic-app-scripts build' ]
12 silly lifecycle hnwApp@~ionic:build: Returned: code: 1  signal: null
13 info lifecycle hnwApp@~ionic:build: Failed to exec ionic:build script
14 verbose stack Error: hnwApp@ ionic:build: `ionic-app-scripts build`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\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:194:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\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:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid hnwApp@
16 verbose cwd C:\dev\papp\app
17 error Windows_NT 10.0.15063
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:build" "--"
19 error node v7.10.0
20 error npm  v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error hnwApp@ ionic:build: `ionic-app-scripts build`
23 error Exit status 1
24 error Failed at the hnwApp@ ionic:build script 'ionic-app-scripts build'.
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 hnwApp package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     ionic-app-scripts build
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs hnwApp
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls hnwApp
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

And the cmd Error information:

[08:21:12]  ionic-app-scripts 0.0.47
[08:21:12]  build dev started ...
[08:21:12]  clean started ...
[08:21:12]  clean finished in 16 ms
[08:21:12]  copy started ...
[08:21:12]  transpile started ...
[08:21:17]  typescript: C:/dev/papp/app/src/providers/my-data.ts, line: 7
[08:21:17]  typescript: C:/dev/papp/app/src/providers/my-data.ts, line: 8
            Cannot find name 'require'.

       L6:  //PouchDB.plugin(require('pouchdb-authentication'));
       L7:      var PouchDB = require("pouchdb");
       L8:      PouchDB.plugin(require('pouchdb-authentication'));

            Cannot find name 'require'.

       L7:      var PouchDB = require("pouchdb");
       L8:      PouchDB.plugin(require('pouchdb-authentication'));

[08:21:17]  transpile failed
[08:21:17]  ionic-app-script task: "build"
[08:21:17]  TypeError: error.message.indexOf is not a function

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:build" "--"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hnwApp@ ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hnwApp@ ionic:build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hnwApp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs hnwApp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls hnwApp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\entwickler\AppData\Roaming\npm-cache\_logs\2017-05-16T06_21_17_597Z-debug.log

Thank you a lot.



via user3793935

No comments:

Post a Comment