vue-bulma / datepicker

Datepicker Component for Vue Bulma
MIT License
115 stars 56 forks source link

Module not found: Error: Cannot resolve module 'stylus-loader' #4

Closed junerockwell closed 8 years ago

junerockwell commented 8 years ago

Below is the specific error message right after the dev server starts (npm run dev):

ERROR in ./~/vue-bulma-datepicker/src/Datepicker.vue
Module not found: Error: Cannot resolve module 'stylus-loader' in /Users/rkwl/Documents/hp_proj/hp/node_modules/vue-bulma-datepicker/src
 @ ./~/vue-bulma-datepicker/src/Datepicker.vue 2:0-166

I installed this component like this: npm install --save vue-bulma-datepicker

I installed stylus-loader but I still have the same error and added this to my webpack.base.conf.js file:

loaders: [
    { test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' }
  ]...

But the error is still there.

Vue: v1.0.21 bulma: v0.1.2 template: Webpack

fundon commented 8 years ago

Which version of your NPM?

NPM v3 is required.

JerroldLee commented 8 years ago

The error is still there,my npm is 3.10.3

fundon commented 8 years ago

Do you use vue-cli to generate your project?

xereda commented 7 years ago

I used vue-cli and I have the same problem. What to do?


ERROR in ./~/vue-bulma-datepicker/src/index.vue
Module not found: Error: Cannot resolve module 'stylus-loader' in /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/vue-bulma-datepicker/src
resolve module stylus-loader in /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/vue-bulma-datepicker/src
  looking for modules in /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules
    module variation stylus-loader-webpack-loader
      /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/stylus-loader-webpack-loader doesn't exist (module as directory)
      resolve 'file' stylus-loader-webpack-loader in /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules
        resolve file
          /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/stylus-loader-webpack-loader doesn't exist
          /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/stylus-loader-webpack-loader.webpack-loader.js doesn't exist
          /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/stylus-loader-webpack-loader.web-loader.js doesn't exist
          /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/stylus-loader-webpack-loader.loader.js doesn't exist
          /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/stylus-loader-webpack-loader.js doesn't exist
    module variation stylus-loader-web-loader
3lpsy commented 7 years ago

I had a similar problem, but that was because I forgot to include stylus itself.

 $ npm install stylus ---save
holic-cl commented 7 years ago

Shouldn't to be a dependency? (stylus)

anish000kumar commented 7 years ago

The only thing that worked for me-

$ npm install stylus stylus-loader ---save-dev