Code Monkey home page Code Monkey logo

Comments (7)

azamat-sharapov avatar azamat-sharapov commented on May 18, 2024

got some code to show?

from vue-loader.

whatsthatjn avatar whatsthatjn commented on May 18, 2024

I just tried the vue-loader-example project and it failed again.

It is very simple, that firstly I install vue-html-editor inside vue-loader-example directory with npm install vue-html-editor --save-dev.

and then I just add one line into src/app.vue as following:

<script>


import compA from './components/a.vue'
import compB from './components/b.vue'

var vueHtmlEditor = require('vue-html-editor');   //code I added 

export default {
  data () {
    return {
      msg: 'Hello from Babel!',
      text: 'try to set something here xxx ssss'      
    }
  },
  methods: {
    nothing: function(){alert(this.text + "?");}
  }, 
  components: {
    'comp-a': compA,
    'comp-b': compB,
    "vue-html-editor": vueHtmlEditor  //code I added 
  }
}
</script>

then I run npm run-script dev and failed with following errors:

ERROR in .//babel-loader?optional[]=runtime&loose=all!.//vue-loader/lib/selector.js?type=script&index=0!./src/app.vue
Module not found: Error: Cannot resolve module 'vue-html-editor' in /Users/whatsthat/Development/github/vue-loader-example/src
@ .//babel-loader?optional[]=runtime&loose=all!.//vue-loader/lib/selector.js?type=script&index=0!./src/app.vue 15:13-39

Seems it is something wrong with selector.js of vue-loader?

from vue-loader.

azamat-sharapov avatar azamat-sharapov commented on May 18, 2024

and then I just add one line into src/app.vue as following:

I don't see any code following..

Are you using npm version 3? And why would you --save-dev it instead of --save?

from vue-loader.

yyx990803 avatar yyx990803 commented on May 18, 2024

You need to surround your code blocks with three backticks... otherwise GitHub will filter away any HTML tags. I can't tell anything wrong with your description, so you need to provide a repo of your code if you want any further help. Also, this most likely has nothing to do with vue-loader.

from vue-loader.

whatsthatjn avatar whatsthatjn commented on May 18, 2024

ok, I found the problem is inside the modules I want to require inside .vue files. These modules have same problems in their package.json file, the main field value is an array , not just string.

from vue-loader.

goyote avatar goyote commented on May 18, 2024

What was the solution to this?

from vue-loader.

purplesyringa avatar purplesyringa commented on May 18, 2024

@goyote The solution was to fix other module's code.

from vue-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.