Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered "Failed to resolve loader" on Netlify #369

Closed
tlhunter opened this issue Sep 10, 2021 · 1 comment
Closed

Encountered "Failed to resolve loader" on Netlify #369

tlhunter opened this issue Sep 10, 2021 · 1 comment

Comments

@tlhunter
Copy link

Just tossing this in here to help anyone who might have the same issue. Couldn't find anything about it using a search engine.

While using the vue3-google-map project, which relied on this library, I encountered the following error:

6:22:41 PM: > vue-cli-service build
6:22:41 PM: -  Building for production...
6:22:57 PM:  ERROR  Failed to compile with 1 error
6:22:57 PM: Failed to resolve loader: @googlemaps/js-api-loader
6:22:57 PM: You may need to install it.
6:22:57 PM:  ERROR  Build failed with errors.

This error was only encountered on Netlify but did not happen locally.

While scrolling through the logs I noticed some output that suggested Netlify was using Node.js v12 while locally I was running Node.js v16. Netlify honors the .node-version file for deciding which version of Node.js to use. To bump this to v16 I ran the following command and checked the file in:

echo '16.3.0' > .node-version

Once that was complete the build would succeed on Netlify.

I don't know if such documentation is a better fit in this repo or in "vue3-google-map", but with the error message listing the name of this repo I felt it wouldn't hurt to paste this here.

@jpoehnelt
Copy link
Contributor

Thanks for sharing. I'll watch out for similar issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants