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

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

XMLWordPrintable

    • 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.
    • MOODLE_39_STABLE
    • MOODLE_400_STABLE
    • Moodle App 4.0

      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.

            noeldemartin Noel De Martin
            adamjohns Adam Johns
            Pau Ferrer Pau Ferrer
            Pau Ferrer Pau Ferrer
            Dani Palou Dani Palou
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.