Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3825

npm run dev:ios fails with Unknown option: '--platform'

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      After this update, the Android & browser commands should work as expected; they should start a development server and update the app running on each platform:

      • npm start (browser)
      • npm run dev:android (Android device)

      A simple test to perform is to add a console.log in the home screen and change the log message. The app should be updated automatically running the new code (you should see the updated log message).

      In iOS, the npm run dev:ios command should only build the application without live reloading.

      Show
      After this update, the Android & browser commands should work as expected; they should start a development server and update the app running on each platform: npm start (browser) npm run dev:android (Android device) A simple test to perform is to add a console.log in the home screen and change the log message. The app should be updated automatically running the new code (you should see the updated log message). In iOS, the npm run dev:ios command should only build the application without live reloading.
    • Affected Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle App 4.0

      Description

      When running

      npm run dev:ios

      I'm now seeing the following error:

       

      > npm run ionic:serve -- --host=localhost --port=8100 --platform=ios --project=app
      [npm] > moodlemobile@3.9.5 ionic:serve /Users/rajohns/Developer/realmoodle/moodleapp
      [npm] > gulp watch & NODE_OPTIONS=--max-old-space-size=4096 ng serve "--host=localhost" "--port=8100" "--platform=ios" "--project=app"
      [npm] [22:15:15] Using gulpfile ~/Developer/realmoodle/moodleapp/gulpfile.js
      [npm] [22:15:15] Starting 'watch'...
      [npm] Unknown option: '--platform'
      [npm] npm ERR! code ELIFECYCLE
      [npm] npm ERR! errno 1
      [npm] npm ERR! moodlemobile@3.9.5 ionic:serve: `gulp watch & NODE_OPTIONS=--max-old-space-size=4096 ng serve "--host=localhost" "--port=8100" "--platform=ios" "--project=app"`
      [npm] npm ERR! Exit status 1
      [npm] npm ERR! 
      [npm] npm ERR! Failed at the moodlemobile@3.9.5 ionic:serve script.
      

       

      It looks like this is due to the change of ionic:serve in package.json using "ng serve" now in 3.9.5 whereas ionic:serve used to use "ionic-app-scripts serve" in previous versions.

        Attachments

          Activity

            People

            Assignee:
            noeldemartin Noel De Martin
            Reporter:
            adamjohns Adam Johns
            Peer reviewer:
            Pau Ferrer Pau Ferrer
            Integrator:
            Pau Ferrer Pau Ferrer
            Tester:
            Dani Palou Dani Palou
            Participants:
            Component watchers:
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: