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

    .15.x dependency error building after simple init

    CLI
    4
    6
    2422
    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.
    • D
      dgk last edited by dgk

      I assume that I can build right after init and get the shipped simple “hello world” app. But I get the following error.
      per my other post I assume autoprefixer is an dependency or dev dependency managed by the cli? cause of course it’s not in package.json.
      http://forum.quasar-framework.org/topic/1943/15-x-init-creates-no-dependencies-is-that-correct

      So why this error? and what is the module internal/module.js these is no internal directory in src.

      .postcssrc.js contains

      module.exports = {
        plugins: [
          // to edit target browsers: use "browserslist" field in package.json
          require('autoprefixer')
        ]
      }
      

      so yea it’s requiring autoprefixer so I need to add that to dev dependencies? or is the cli supposed to handle this. If not then why was it not added to the package.json by init

      Guess I need some clarification about the init/build process being it’s not webpack anymore.

      $ quasar build -d
       app:build [ DEBUG ] Mode [ SPA ] with [ MAT ] theme +0ms
      
      module.js:559
          throw err;
          ^
      
        Error: Cannot find module 'autoprefixer'
        
        - module.js:11 require
          internal/module.js:11:18
        
        - .postcssrc.js:6 Object.<anonymous>
          /home/david/AllData/hacking/active-dev-repos/frontend15x/.postcssrc.js:6:5
        
        - module.js:11 require
          internal/module.js:11:18
        
        - get-css-utils.js:14 Object.<anonymous>
          [lib]/[quasar-cli]/lib/build/get-css-utils.js:14:17
      
      1 Reply Last reply Reply Quote 0
      • benoitranque
        benoitranque last edited by

        What options did you choose on init?
        And this should be fixable by simply running npm install --save-dev autoprefixer

        1 Reply Last reply Reply Quote 0
        • D
          dgk last edited by

          Yes I understand I can do this but I want to understand why the cli or the init process doesn’t handle this dependency per @rstoenescu answer to my other post mentioned. Pre .15 there was not issue like this. The init added all required dependencies to package.json.

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            This should be handled by Quasar CLI. No need to manually install it.
            Sometimes NPM messes things up. If so, delete node_modules and package-lock.json and npm install again.

            1 Reply Last reply Reply Quote 0
            • D
              dgk last edited by

              Actually I was choosing yarn.
              I did this three times to new dir each time. Always the same issue.
              Then this morning I did it again…no error. Not sure why but apparently can’t reproduce it.

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

                I had the same problem. For me, the error was node enviroment set to “production”.
                Setting to “development” and running “npm install” make it work

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