Project creation error:
This dependency was not found: * !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./ in ./src/components/ To install it, you can run: npm install --save !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./
Solution:
npm install stylus-loader css-loader style-loader --save-dev
An error will be reported after installation:
Module build failed: Error: Cannot find module 'stylus' at ._resolveFilename (:485:15) at ._load (:437:25) at (:513:17) at require (internal/:11:18) at Object.<anonymous> (E:\project\selling\node_modules\stylus-loader\:2:14) at Module._compile (:569:30) at ._extensions..js (:580:10) at (:503:32)
Continue to execute:
npm install stylus
Then execute npm run dev
solve
Therefore, the following steps are required to be installed during the initialization
install stylus --save-dev
install stylus-loader --save-dev
run dev (Every time the configuration file is changed, the project needs to be restarted)
The above article is shared with the first time using stylus installation method after the vue project was created. I hope it can give you a reference and I hope you can support me more.