请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

These relative modules were not found:

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的依赖

正在回答 回答被采纳积分+3

4回答

ustbhuangyi 2018-04-18 00:15:54

资源路径问题吧

1 回复 有任何疑惑可以回复我~
  • 提问者 裸呆色 #1
    This relative module was not found:
    
    * ./src/main.js in multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
    
    https://github.com/luodaise/vue-music
    老师帮看看 已经找了一天了 
    上个问题把所有的node_modules的包换了 不包错了 
    现在有出现这个问题 真不知道怎么弄了
    回复 有任何疑惑可以回复我~ 2018-04-18 14:53:55
  • ustbhuangyi 回复 提问者 裸呆色 #2
    ./src/main.js 这个相对路径对吗
    回复 有任何疑惑可以回复我~ 2018-04-18 15:04:50
  • 提问者 裸呆色 回复 ustbhuangyi #3
    项目里面src 包里面有个main.js  在node_module是 里面的webpack  和webpack-dev-server 里面的包里面没有  我把你的工程下下来 跑起来 看 这两个包里面也没有main.js文件
    回复 有任何疑惑可以回复我~ 2018-04-18 15:28:42
ustbhuangyi 2018-04-18 21:13:22

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

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

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

0 回复 有任何疑惑可以回复我~
  • 提问者 裸呆色 #1
    嗯好的  有了这次教训会认真听讲的  谢谢老师看代码帮找出问题 谢谢!!!
    回复 有任何疑惑可以回复我~ 2018-04-18 21:51:59
提问者 裸呆色 2018-04-17 17:24:55

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 17:26:17
提问者 裸呆色 2018-04-17 17:01:31

* ../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 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信