weixin_39816260
weixin_39816260
2020-11-29 10:59

500 error for unknown reason after restart computer

I tried to use vue2-google-maps and it worked well. Suddenly my computer had stopped working and then I restarted my computer. Then, strangely, 500-error comes out.

I reverted all codes associated with vue2-google-maps then my project works well. Even though when I import vue2-google-maps then It occurs 500-error. :(


import * as VueGoogleMaps from 'vue2-google-maps';

It was working well but now cause of the unknown reason it has been broken... Here is my console shows error.


webpack built 5410edae88d11b814c0b in 2690ms
error during render : /search
/media/bossminion/Work/WeMeet/frontend/node_modules/vue2-google-maps/dist/components/infoWindow.vue:3
<template>
^

SyntaxError: Unexpected token <
    at Module._compile (internal/modules/cjs/loader.js:720:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/media/bossminion/Work/WeMeet/frontend/node_modules/vue2-google-maps/dist/main.js:42:19)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at r (/media/bossminion/Work/WeMeet/frontend/node_modules/vue-server-renderer/build.dev.js:9295:16)
    at Object.<anonymous> (webpack:/external "vue2-google-maps":1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap a442baf8af813fadc2a4:25:0)
error during render : /favicon.ico
/media/bossminion/Work/WeMeet/frontend/node_modules/vue2-google-maps/dist/components/infoWindow.vue:3
<template>
^

SyntaxError: Unexpected token <
    at Module._compile (internal/modules/cjs/loader.js:720:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/media/bossminion/Work/WeMeet/frontend/node_modules/vue2-google-maps/dist/main.js:42:19)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at r (/media/bossminion/Work/WeMeet/frontend/node_modules/vue-server-renderer/build.dev.js:9295:16)
    at Object.<anonymous> (webpack:/external "vue2-google-maps":1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap a442baf8af813fadc2a4:25:0)
</anonymous></anonymous></template></anonymous></anonymous></template>

I posted this error in stackoverflow but no answer yet.

该提问来源于开源项目:xkjyeah/vue-google-maps

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

11条回答

  • weixin_39533361 weixin_39533361 5月前

    If this fix the issue I will close it. Please confirm this is solved.

    点赞 评论 复制链接分享
  • weixin_39816260 weixin_39816260 5月前

    And in console in devTools, it says "Failed to load resource: the server responded with a status of 500 (Internal Server Error)". And I fresh the site by pressing 'F5' and it says like below:

    image

    点赞 评论 复制链接分享
  • weixin_39533361 weixin_39533361 5月前

    can you reproduce this in a small project in jsfiddle or stackblitz? That will be helpful for debug this behavior. Are you sure that you create the project with /cli? Can you run yarn upgrade or equivalent npm update --save to update all dependencies and post your package.json?

    点赞 评论 复制链接分享
  • weixin_39816260 weixin_39816260 5月前

    I run this project by : npm run dev.

    点赞 评论 复制链接分享
  • weixin_39533361 weixin_39533361 5月前

    you are making SSR instead if you not use nuxt, please take a look the link posted for :

    https://github.com/xkjyeah/vue-google-maps#nuxtjs-config

    点赞 评论 复制链接分享
  • weixin_39996478 weixin_39996478 5月前

    https://github.com/xkjyeah/vue-google-maps#nuxtjs-config

    点赞 评论 复制链接分享
  • weixin_39533361 weixin_39533361 5月前

    why you post this link? said:

    Hi, Thanks for your interest! I ran this in localhost:8080 and I don't use nuxt.

    点赞 评论 复制链接分享
  • weixin_39533361 weixin_39533361 5月前

    The error 500 was calling the map api? the error was in local or in the server?

    点赞 评论 复制链接分享
  • weixin_39816260 weixin_39816260 5月前

    Hi, Thanks for your interest! I ran this in localhost:8080 and I don't use nuxt.

    点赞 评论 复制链接分享
  • weixin_39816260 weixin_39816260 5月前

    I just imported vue2-google-maps and didn't use it. Can it be fixed by editing webpack.config.js? I have no idea. :(

    点赞 评论 复制链接分享
  • weixin_39533361 weixin_39533361 5月前

    The last realized version works very well, I use it in many projects. I don't think that webpack config cause this issue. Can you provide an example in jsfiddle or stackblitz to reproduce this issue?

    点赞 评论 复制链接分享

相关推荐