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

资源路径问题吧

1
13
裸呆色
回复
ustbhuangyi
https://github.com/luodaise/whatmusic 老师帮忙给看下 卡这了
2018-04-18
共13条回复

ustbhuangyi

2018-04-18

几个问题,首先你的 components 没有配置 alias
//img.mukewang.com/szimg/5ad744070001d64d12920480.jpg
第二,你要单独安装 stylus 插件:

//img.mukewang.com/szimg/5ad74422000103a209040146.jpg
第三,你的 rank.vue 中 style 应该是 stylus,而你写成了 sttylus,太粗心。

总结一下,前面 2 个问题我视频都有讲,你没有认真听讲。最后一个问题是你太粗心,但是仔细看报错信息也是可以看的出来。

0
1
裸呆色
嗯好的 有了这次教训会认真听讲的 谢谢老师看代码帮找出问题 谢谢!!!
2018-04-18
共1条回复

裸呆色

提问者

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.png

0
1
裸呆色
import Vue from 'vue' import Router from 'vue-router' import Recommend from 'components/recommend/recommend' import Singer from 'components/singer/singer' import Rank from 'components/rank/rank' import Search from 'components/search/search' Vue.use(Router) export default new Router({ routes: [ { path: '/', redirect: '/recommend' }, { path: '/recommend', component: Recommend }, { path: '/singer', component: Singer }, { path: '/rank', component: Rank }, { path: '/search', component: Search } ] })
2018-04-17
共1条回复

裸呆色

提问者

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.styl

0
0

Vue2.0高级应用教学实战,开发企业级移动端音乐Web App

Vue.js高级知识应用大集合,实战企业级APP,教你搞定组件化开发。

5432 学习 · 3804 问题

查看课程