You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I get the following error modules[moduleId] is undefined.
Since this is a very wide webpack error, I was unable to figure out where it comes from.
When developing, I changed a new .vue files, Laravel Mix picked up the changes and it worked again. I know, things that randomly start working again, are the best.
Does anyone know why this might be happening? I first assumed it would be due to incorrect mix setup, but I doubt that.
The error happens both in dev as in production.
When it happens, the pages is completely blank and the console says one thing:
TypeError: t[e] is undefined bootstrap:63:3
When clicking to that location, I see:
// ...// The require functionfunction__webpack_require__(moduleId){// Check if module is in cacheif(installedModules[moduleId]){returninstalledModules[moduleId].exports;}// Create a new module (and put it into the cache)varmodule=installedModules[moduleId]={i: moduleId,l: false,exports: {}};// Execute the module function/* this line */modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);// Flag the module as loadedmodule.l=true;// Return the exports of the modulereturnmodule.exports;}// ...
For reference, my mix file:
constmix=require('laravel-mix')constSentryWebpackPlugin=require('@sentry/webpack-plugin')require('laravel-mix-tailwind')require('laravel-mix-purgecss')constwebpackConfig=webpack=>{constconfig={resolve: {alias: {'vue$': 'vue/dist/vue.runtime.esm.js','@': path.resolve('resources/js'),},},output: {chunkFilename: 'js/[name].js?id=[chunkhash]',},}if(mix.inProduction()){constASSET_URL=process.env.ASSET_URL+"/"config.plugins=[newwebpack.DefinePlugin({"process.env.ASSET_PATH": JSON.stringify(ASSET_URL)}),newSentryWebpackPlugin({include: 'public',configFile: 'sentry.properties',}),]config.output.publicPath=ASSET_URLmix.setResourceRoot(ASSET_URL)mix.sourceMaps()mix.purgeCss({whitelistPatterns: [/(^|\.)fa-/,/-fa($|\.)/,/^vs__/,/^vs--/,/^CodeMirror/,/^cm-/,/^te-/,/^tui-/],whitelistPatternsChildren: [/^CodeMirror/,/^cm-/,/^te-/,/^tui-/,/auto-height/],})}returnconfig}/* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */mix.postCss('resources/css/app.css','public/css')mix.js('resources/js/app.js','public/js')// css configsmix.tailwind('./tailwind.config.js')// js configsmix.webpackConfig(webpackConfig)mix.babelConfig({plugins: ['@babel/plugin-syntax-dynamic-import']})
The text was updated successfully, but these errors were encountered:
Hey @georgeboot! I'm honestly not sure what's going on here, but I don't think this is Inertia related. I'd recommend asking on the Laravel Mix repo. You may also want to try and update Mix, and even Node/NPM.
Sometimes I get the following error
modules[moduleId] is undefined
.Since this is a very wide webpack error, I was unable to figure out where it comes from.
When developing, I changed a new
.vue
files, Laravel Mix picked up the changes and it worked again. I know, things that randomly start working again, are the best.Does anyone know why this might be happening? I first assumed it would be due to incorrect mix setup, but I doubt that.
The error happens both in dev as in production.
When it happens, the pages is completely blank and the console says one thing:
When clicking to that location, I see:
For reference, my mix file:
The text was updated successfully, but these errors were encountered: