vuejs-templates / webpack-simple

A simple Webpack + vue-loader setup for quick prototyping.
2.27k stars 894 forks source link

Npm run dev fails #152

Closed ghost closed 6 years ago

ghost commented 6 years ago

` 'css-loader', ^^^^^^^^^^^^

SyntaxError: Unexpected string at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:599:28) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at requireConfig (C:[...]\node_modules\webpack\bin\convert-argv.js:97:18) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [...]@1.0.0 dev: cross-env NODE_ENV=development webpack-dev-server --open --hot npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the booktop@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:[...]\npm-cache_logs\2017-11-06T20_27_35_153Z-debug.log`

ghost commented 6 years ago

After inserting a comma this issue appears: https://github.com/vuejs-templates/webpack-simple/issues/151

    throw e;
    ^

Error: options/query provided without loader (use loader + options) in {
  "test": {},
  "use": "vue-loader",
  "options": {
    "loaders": {
      "scss": [
        "vue-style-loader",
        "css-loader",
        "sass-loader"
      ],
      "sass": [
        "vue-style-loader",
        "css-loader",
        "sass-loader?indentedSyntax"
      ]
    }
  }
}
mikebonds commented 6 years ago

Getting the same thing....

ghost commented 6 years ago

Fixed this issue with replacing all "use"-s with "loader(s)": Example:

{
        test: /\.sass$/,
        use: [
          'vue-style-loader',
          'css-loader',
          'sass-loader?indentedSytanx'
        ],
}

Replaced with

{
        test: /\.sass$/,
        loaders: [
          'vue-style-loader',
          'css-loader',
          'sass-loader?indentedSytanx'
        ],
}