When compiling an old vue 2 project using https://github.com/vuejs/create-vue @legacy
I get the following error with vue2-google-maps@0.10.7
[vite:vue2] Could not load /node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js?commonjs-exports (imported by node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js): The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '\x00/node_modules/vue2-google-maps/dist/components/pl...
error during build:
TypeError [PLUGIN_ERROR]: Could not load /node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js?commonjs-exports (imported by node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js): The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '\x00/node_modules/vue2-google-maps/dist/components/pl...
at Object.readFileSync (node:fs:440:14)
at Object.load (C:\projects\sanistaal\Webshop-v4\src\Sanistaal.Website\client-vite\Ahlsell\node_modules\@vitejs\plugin-vue2\dist\index.cjs:3217:30)
at file:////node_modules/rollup/dist/es/shared/rollup.js:22748:40
ERROR: "build-only" exited with 1.
I have identified the root cause being in placeInput.vue
When compiling an old vue 2 project using https://github.com/vuejs/create-vue @legacy I get the following error with vue2-google-maps@0.10.7
[vite:vue2] Could not load/node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js?commonjs-exports (imported by node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js): The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '\x00/node_modules/vue2-google-maps/dist/components/pl...
error during build:
TypeError [PLUGIN_ERROR]: Could not load /node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js?commonjs-exports (imported by node_modules/vue2-google-maps/dist/components/placeInputImpl.js?vue&type=script&src=true&lang.js): The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '\x00/node_modules/vue2-google-maps/dist/components/pl...
at Object.readFileSync (node:fs:440:14)
at Object.load (C:\projects\sanistaal\Webshop-v4\src\Sanistaal.Website\client-vite\Ahlsell\node_modules\@vitejs\plugin-vue2\dist\index.cjs:3217:30)
at file:////node_modules/rollup/dist/es/shared/rollup.js:22748:40
ERROR: "build-only" exited with 1.
I have identified the root cause being in placeInput.vue
The other vue components use function based require inclusion of the corresponding backend code so this code works: