.15.x dependency error building after simple init
-
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-correctSo why this error? and what is the module
internal/module.js
these is no internal directory insrc
..postcssrc.js
containsmodule.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 byinit
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
-
What options did you choose on init?
And this should be fixable by simply runningnpm install --save-dev autoprefixer
-
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.
-
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. -
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. -
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