Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

automica's avatar

InertiaJs can't find module.

I've been having a play with inertiaJs following @jeffreyWay recent series. https://laracasts.com/series/learn-inertia-with-jeffrey

Having looked through the pingcrm demo app, I'm now looking at a basic blog post with the view of getting through InertiaJs 101.

https://laravelarticle.com/laravel-inertia-js-crud-tutorial

I've made suitable changes to above post to get working with Laravel 8 but am running up against an issue which gives me the following error:

[Vue warn]: Error in created hook: "Error: Cannot find module './Applications/Index'"

where Index is a vue file within Pages/Applications

If I run mix watch I also get

[webpack-cli] ReferenceError: self is not defined

    at /Users/foo/robot002/public/js/app.js:32445:37
    at /Users/foo/robot002/public/js/app.js:32448:13
    at Object.<anonymous> (/Users/foo/robot002/public/js/app.js:32459:12)
    at Module._compile (/Users/foo/robot002/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (/Users/foo/robot002/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/Users/foo/robot002/webpack.mix.js:2:14)

and this causes mix to fail.

It maybe that I've missed something in my installation of inertiajs. Does anyone have an familiarity with both errors or can recommend a real basic inertiajs tutorial so I can find my feet?

0 likes
0 replies

Please or to participate in this conversation.