mingyunyuziyou

This dependency was not found: * common/stylus/index.styl in ./src/main.js To install it, you can run

作者: 秒速五厘米     
 


有如下错误:


 ERROR  Failed to compile with 1 errors                    20:13:54

This dependency was not found:

* common/stylus/index.styl in ./src/main.js

To install it, you can run: npm install --save common/stylus/index.styl

解决:

  [1] => 10.log
    [2] => 10.tar.gz
    [3] => aaa.tar.gz
    [4] => mytest
    [5] => test1101
    [6] => test1102
    [7] => weblog_2010_09
)


1、首先 npm install stylus-loader stylus --save-dev 

2、然后 build\webpack.base.conf.js


将 resolve添加

resolve: {
 extensions: ['.js', '.vue', '.json'],
  alias: {
    '@': resolve('src'),
    'common': resolve('src/common')//resolve转化为绝对路径,用到node.js中path.join()方法
  }
},