找不到输入模块中的错误:错误:无法解析“ C:\ project \ projekt”中的“ ./src”

时间:2020-01-13 02:06:31

标签: vue.js webpack-dev-server

我一直在寻找不同的答案,但它对我不起作用,当我尝试在Windows上运行npm run start:dev时,出现此错误:

找不到入口模块中的错误:错误:无法解析'C:\ project \ projekt'中的'./src'

我的package.json文件是:

{
  "name": "projekt",
  "private": true,
  "dependencies": {
    "@rails/actioncable": "^6.0.0",
    "@rails/activestorage": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "4.2.2",
    "turbolinks": "^5.2.0",
    "vue": "^2.6.11",
    "vue-loader": "^15.8.3",
    "vue-resource": "^1.5.1",
    "vue-template-compiler": "^2.6.11",
    "vue-turbolinks": "^2.0.4"
  },
  "scripts": {
    "start:dev": "webpack-dev-server"
  },
  "version": "0.1.0",
  "devDependencies": {
    "webpack": "^4.41.5",
    "webpack-dev-server": "^3.10.1"
  }
}

我的webpack.config.js文件是:

var webpack = require('webpack');

module.exports = {
  entry: __dirname + '/index.js',
  output: {
    path: __dirname + '/',
    filename: 'specs.js'
  },
  module: {
    loaders: [
      { test: /\.js$/, loader: 'buble-loader', exclude: /node_modules/ }
    ]
  },
  plugins: [new webpack.optimize.ModuleConcatenationPlugin()]
};

0 个答案:

没有答案