WordPress LMS for Web and mobile Forums Ionic App Support npm has unexpectedly closed (exit code 1).

npm has unexpectedly closed (exit code 1).

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31345

    ben
    Participant

    Cmd Prompt:

    > npm run ionic:serve — –host=0.0.0.0 –port=8100

    [npm] > [email protected] ionic:serve C:\Users\benro\OneDrive\Documents\Ionic\projectname

    [npm] > ionic-app-scripts serve “–host=0.0.0.0” “–port=8100”

    [npm] ‘ionic-app-scripts’ is not recognized as an internal or external command,

    [npm] operable program or batch file.

    [npm] npm ERR! code ELIFECYCLE

    [npm] npm ERR! errno 1

    [npm] npm ERR! [email protected] ionic:serve: ionic-app-scripts serve "--host=0.0.0.0" "--port=8100"

    [npm] npm ERR! Exit status 1

    [npm] npm ERR!

    [npm] npm ERR! Failed at the [email protected] ionic:serve script.

    [npm] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    [npm] npm ERR! A complete log of this run can be found in:

    [npm] npm ERR!     C:\Users\benro\AppData\Roaming\npm-cache\_logs\2019-08-15T14_54_47_263Z-debug.log

     

    [ERROR] npm has unexpectedly closed (exit code 1).

     

    The Ionic CLI will exit. Please check any output above for error details.

    ———-

    Error log:

    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:serve’,

    1 verbose cli   ‘–‘,

    1 verbose cli   ‘–host=0.0.0.0’,

    1 verbose cli   ‘–port=8100’ ]

    2 info using [email protected]

    3 info using [email protected].2

    4 verbose run-script [ ‘preionic:serve’, ‘ionic:serve’, ‘postionic:serve’ ]

    5 info lifecycle [email protected]~preionic:serve: [email protected]

    6 info lifecycle [email protected]~ionic:serve: [email protected]

    7 verbose lifecycle [email protected]~ionic:serve: unsafe-perm in lifecycle true

    8 verbose lifecycle [email protected]~ionic:serve: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\benro\OneDrive\Documents\Ionic\projectname\node_modules\.bin;C:\Users\benro\OneDrive\Documents\Ionic\projectname\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;melyngo;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Users\benro\AppData\Roaming\npm

    9 verbose lifecycle [email protected]~ionic:serve: CWD: C:\Users\benro\OneDrive\Documents\Ionic\projectname

    10 silly lifecycle [email protected]~ionic:serve: Args: [ ‘/d /s /c’,

    10 silly lifecycle   ‘ionic-app-scripts serve “–host=0.0.0.0” “–port=8100″‘ ]

    11 silly lifecycle [email protected]~ionic:serve: Returned: code: 1  signal: null

    12 info lifecycle [email protected]~ionic:serve: Failed to exec ionic:serve script

    13 verbose stack Error: [email protected] ionic:serve: ionic-app-scripts serve "--host=0.0.0.0" "--port=8100"

    13 verbose stack Exit status 1

    13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)

    13 verbose stack     at EventEmitter.emit (events.js:198:13)

    13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)

    13 verbose stack     at ChildProcess.emit (events.js:198:13)

    13 verbose stack     at maybeClose (internal/child_process.js:982:16)

    13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

    14 verbose pkgid [email protected]

    15 verbose cwd C:\Users\benro\OneDrive\Documents\Ionic\projectname

    16 verbose Windows_NT 10.0.17763

    17 verbose argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js” “run” “ionic:serve” “–” “–host=0.0.0.0” “–port=8100”

    18 verbose node v10.16.2

    19 verbose npm  v6.9.0

    20 error code ELIFECYCLE

    21 error errno 1

    22 error [email protected] ionic:serve: ionic-app-scripts serve "--host=0.0.0.0" "--port=8100"

    22 error Exit status 1

    23 error Failed at the [email protected] ionic:serve script.

    23 error This is probably not a problem with npm. There is likely additional logging output above.

    24 verbose exit [ 1, true ]

     

    Need help resolving the above error please.

     

    #31355

    Harry
    Spectator

    Hi

    1. In your terminal, navigate to the ionic project’s root folder
    2. Run this command: npm install @ionic/[email protected] --save-dev
    3. Run npm rebuild node-sass to build the binding for your current environment.

    If this command will not be work then
    this is my package.json folder replace your project package.json folder by this.

    Then serve This command  npm install 

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.