Laravel Version
10.10
PHP Version
8.2
Database Driver & Version
MySQL Mac
Description
I'm currently working on a Laravel project with Inertia.js Vue 3 Composition API and TypeScript. However, I've encountered an issue after installing and configuring laravel-precognition-vue-inertia. When I run my project, I see several errors in the terminal related to missing exports and modules in laravel-precognition. Here are the errors that I am seeing:
ERROR in ./node_modules/laravel-precognition-vue-inertia/dist/index.js 20:8-32
export 'toSimpleValidationErrors' (imported as 'toSimpleValidationErrors') was not found in 'laravel-precognition' (module has no exports)
ERROR in ./node_modules/laravel-precognition-vue/dist/index.js 29:22-37
export 'createValidator' (imported as 'createValidator') was not found in 'laravel-precognition' (module has no exports)
ERROR in ./node_modules/laravel-precognition-vue/dist/index.js 44:22-46
export 'toSimpleValidationErrors' (imported as 'toSimpleValidationErrors') was not found in 'laravel-precognition' (module has no exports)
ERROR in ./node_modules/laravel-precognition-vue/dist/index.js 91:19-30
export 'resolveName' (imported as 'resolveName') was not found in 'laravel-precognition' (module has no exports)
ERROR in ./node_modules/laravel-precognition-vue/dist/index.js 129:19-25
export 'client' (imported as 'client') was not found in 'laravel-precognition' (module has no exports)
ERROR in ./node_modules/laravel-precognition/dist/index.js 1:0-34
Module not found: Error: Can't resolve './client' in 'project-x/node_modules/laravel-precognition/dist'
Did you mean 'client.js'?
BREAKING CHANGE: The request './client' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx",".vue"]' instead of '["",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx",".vue"]'?
ERROR in ./node_modules/laravel-precognition/dist/index.js 2:0-85
Module not found: Error: Can't resolve './validator' in 'project-x/node_modules/laravel-precognition/dist'
Did you mean 'validator.js'?
BREAKING CHANGE: The request './validator' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx",".vue"]' instead of '["",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx",".vue"]'?
ERROR in ./node_modules/laravel-precognition/dist/index.js 3:0-24
Module not found: Error: Can't resolve './types' in 'project-x/node_modules/laravel-precognition/dist'
Did you mean 'types.js'?
BREAKING CHANGE: The request './types' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx",".vue"]' instead of '["",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx",".vue"]'?`