這是我得到的錯誤:找不到模塊「。」在webpackMissingModule
Cannot find module "." at webpackMissingModule
這是我webpack.config.js文件。我怎樣才能找出哪條線路導致錯誤?如果它不是導致它的webpack.config.js,我可否知道我應該檢查什麼?
module.exports = [
{
entry: {
core: './node_modules/core-js/client/shim.min.js',
zone: './node_modules/zone.js/dist/zone.js',
reflect: './node_modules/reflect-metadata/Reflect.js',
system: './node_modules/systemjs/dist/system.src.js'
},
output: {
filename: './wwwroot/js/[name].js'
},
target: 'web',
node: {
fs: "empty"
}
},
{
entry: {
app: './wwwroot/app/main.ts',
developerlist: './wwwroot/app/developerlist.bootstrap.ts',
rating: './wwwroot/app/rating.bootstrap.ts'
},
output: {
filename: './wwwroot/js/[name].js'
},
devtool: 'source-map',
resolve: {
extensions: ['.webpack.js', '.web.js', '.ts', '.js']
},
module: {
loaders: [
{ test: /\.ts$/, loader: 'ts-loader' }
]
}
}];
console.trace:
(anonymous) @ VM214:1
webpackMissingModule @ system.js:6179
SystemJSLoader$1 @ system.js:6179
(anonymous) @ system.js:6299
(anonymous) @ system.js:6308
(anonymous) @ system.js:6311
__webpack_require__ @ system.js:20
(anonymous) @ system.js:66
(anonymous) @ system.js:69
VM215:1 console.trace
Error: Cannot find module "." at webpackMissingModule (http://localhost:5000/js/system.js:6179:67) [] at new SystemJSLoader$1 (http://localhost:5000/js/system.js:6179:145) [] at http://localhost:5000/js/system.js:6299:14 [] at Object. (http://localhost:5000/js/system.js:6308:2) [] at Object. (http://localhost:5000/js/system.js:6311:30) [] at webpack_require (http://localhost:5000/js/system.js:20:30) [] at http://localhost:5000/js/system.js:66:18 [] at http://localhost:5000/js/system.js:69:10 [] code: "MODULE_NOT_FOUND"
你可以prive完整的錯誤堆棧跟蹤? –
添加了痕跡,但我不確定它是否有幫助。 –
你忘了在package.json中添加模塊嗎? npm安裝也許?這有幫助嗎? https://stackoverflow.com/questions/34823655/webpack-missing-module-module-not-found – djalmaaraujo