No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    npm tasks 'dev' and 'build' not available in 0.15

    Framework
    4
    11
    2219
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bobdylan last edited by

      I use PHPStorm as IDE. With the previous version of Quasar I could use the built-in npm taskrunner, to start ‘dev’ or ‘build’.

      With 0.15 only the npm tasks ‘lint’ and ‘test’ are available. I have to do ‘quasar dev’ from the command-line to run my app, but I prefer being able to do this from within PHPStorm.

      Any workaround for this ?

      1 Reply Last reply Reply Quote 0
      • a47ae
        a47ae last edited by

        There are multiple possibilities:

        First one ist to simply edit your package.json file and under the scripts section add the following:

        "scripts": {
          "lint": "eslint --ext .js,.vue src",
          "test": "echo \"No test specified\" && exit 0",
           "dev": "quasar dev",
          "build": "quasar build"
        }
        

        This allows you to call npm run dev which the runs quasar dev (assuming quasar-cli is globally installed)

        Second option ist to add an run configuration like described here: https://www.jetbrains.com/help/phpstorm/creating-and-editing-run-debug-configurations.html#createExplicitly

        B 1 Reply Last reply Reply Quote 0
        • B
          bobdylan @a47ae last edited by

          @a47ae perfect, thank you

          1 Reply Last reply Reply Quote 0
          • B
            bobdylan last edited by

            One more question, when I try to run ‘quasar build -m cordova -T android’, it complains that ‘cordova’ is not recognized as an internal or external command. This is probably because of the fact that cordova needs to be run as an administrator (I use Windows). Any idea how to force npm (or quasar) to be run as an Administrator ?

            1 Reply Last reply Reply Quote 0
            • a47ae
              a47ae last edited by a47ae

              Ist this a general problem with the Quasar build -m cordova -T android command or only if you put it in your npm script section?

              If it is only in npm I would suspect this is due to npm interpreting “cordova” not as a flag but as a command. Try to just write quasar build in your scripts section (assuming the command name is build) and run npm run build — -m cordova -T android (the — is intentional to escape the arguments)

              Edit: the code above is a bit hard to read with the forum font, npm run build has to be followed by two -

              1 Reply Last reply Reply Quote 0
              • B
                bobdylan last edited by

                Found the solution for this problem: running PHPStorm as administrator solved it. You can check this in the shortcut of PHPStorm under ‘Advanced’.

                1 Reply Last reply Reply Quote 1
                • a47ae
                  a47ae last edited by

                  Nice, thanks for sharing this!

                  1 Reply Last reply Reply Quote 0
                  • T
                    terry last edited by

                    ( this is same question with bobdylan, other thing is I use VS Code)

                    I use VS code as IDE. With the previous version of Quasar I could use the built-in debugger/npm taskrunner, to start ‘dev’ or ‘build’.

                    With 0.15 only the npm tasks ‘lint’ and ‘test’ are available. I have to do ‘quasar dev’ from the command-line to run my app, but I prefer being able to do this from within VS Code.

                    Any workaround for this ?

                    1 Reply Last reply Reply Quote 0
                    • T
                      terry last edited by

                      I use PHPStorm as IDE. With the previous version of Quasar I could use the built-in npm taskrunner, to start ‘dev’ or ‘build’.

                      With 0.15 only the npm tasks ‘lint’ and ‘test’ are available. I have to do ‘quasar dev’ from the command-line to run my app, but I prefer being able to do this from within PHPStorm.

                      Any workaround for this ?

                      1 Reply Last reply Reply Quote 0
                      • M
                        Max last edited by

                        @terry you can always add custom console runners in php storm. just check their documentation…

                        1 Reply Last reply Reply Quote 0
                        • T
                          terry last edited by

                          thanks @Max, will try as you comment with both PHPStorm and VS Code

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post