These relative modules were not found:
来源:3-2 路由配置+ tab 顶导组件开发
裸呆色
2018-04-17
These relative modules were not found:
* ./logo@3x.png in ./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"optionsId":"0","vue":true,"id":"data-v-52513b3c","scoped":true,"sourceMap":true}!./node_modules/stylus-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/m-header/m-header.vue
* ./logo@2x.png in ./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"optionsId":"0","vue":true,"id":"data-v-52513b3c","scoped":true,"sourceMap":true}!./node_modules/stylus-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/m-header/m-header.vue
* ../fonts/music-icon.svg?2qevqt in ./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/stylus-loader??ref--11-3!./src/common/stylus/index.styl
* ../fonts/music-icon.woff?2qevqt in ./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/stylus-loader??ref--11-3!./src/common/stylus/index.styl
* ../fonts/music-icon.ttf?2qevqt in ./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/stylus-loader??ref--11-3!./src/common/stylus/index.styl
* ../fonts/music-icon.eot?2qevqt in ./node_modules/css-loader??ref--11-1!./node_modules/postcss-loader/lib??ref--11-2!./node_modules/stylus-loader??ref--11-3!./src/common/stylus/index.styl
package.json 有引入css-loader的依赖
4回答
-
ustbhuangyi
2018-04-18
资源路径问题吧
1132018-04-18 -
ustbhuangyi
2018-04-18
几个问题,首先你的 components 没有配置 alias
第二,你要单独安装 stylus 插件:
第三,你的 rank.vue 中 style 应该是 stylus,而你写成了 sttylus,太粗心。
总结一下,前面 2 个问题我视频都有讲,你没有认真听讲。最后一个问题是你太粗心,但是仔细看报错信息也是可以看的出来。012018-04-18 -
裸呆色
提问者
2018-04-17
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import fastclick from 'fastclick'
import VueLazyload from 'vue-lazyload'
// import 'common/stylus/index.styl'
fastclick.attach(document.body)
Vue.use(VueLazyload, {
loading: require('common/image/default.png')
})
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
render: h => h(App)
})报错如下
These dependencies were not found:
* components/m-header/m-header in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
* components/rank/rank in ./src/router/index.js
* components/recommend/recommend in ./src/router/index.js
* components/search/search in ./src/router/index.js
* components/singer/singer in ./src/router/index.js
* components/tab/tab in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
* common/image/default.png in ./src/main.js
To install them, you can run: npm install --save components/m-header/m-header components/rank/rank components/recommend/recommend components/search/search components/singer/singer components/tab/tab common/image/default.png012018-04-17 -
裸呆色
提问者
2018-04-17
* ../fonts/music-icon.eot?2qevqt in ./node_modules/_css-loader@0.28.11@css-loader??ref--12-1!./node_modules/_postcss-loader@2.1.4@postcss-loader/lib??ref--12-2!./node_modules/_stylus-loader@3.0.2@stylus-loader??ref--12-3!./src/common/stylus/index.styl
* ../fonts/music-icon.ttf?2qevqt in ./node_modules/_css-loader@0.28.11@css-loader??ref--12-1!./node_modules/_postcss-loader@2.1.4@postcss-loader/lib??ref--12-2!./node_modules/_stylus-loader@3.0.2@stylus-loader??ref--12-3!./src/common/stylus/index.styl
* ../fonts/music-icon.woff?2qevqt in ./node_modules/_css-loader@0.28.11@css-loader??ref--12-1!./node_modules/_postcss-loader@2.1.4@postcss-loader/lib??ref--12-2!./node_modules/_stylus-loader@3.0.2@stylus-loader??ref--12-3!./src/common/stylus/index.styl
* ../fonts/music-icon.svg?2qevqt in ./node_modules/_css-loader@0.28.11@css-loader??ref--12-1!./node_modules/_postcss-loader@2.1.4@postcss-loader/lib??ref--12-2!./node_modules/_stylus-loader@3.0.2@stylus-loader??ref--12-3!./src/common/stylus/index.styl00
相似问题