vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

We're sorry but work doesn't work properly without JavaScript enabled. #5470

Closed alien-neko closed 4 years ago

alien-neko commented 4 years ago

Version

4.3.1

Environment info

We're sorry but work doesn't work properly without JavaScript enabled. Please enable it to continue.

Steps to reproduce

I created a VueJS app and I'm getting the following error when I look at the source code in the web browse

We're sorry but work doesn't work properly without JavaScript enabled. Please enable it to continue.

What is expected?

Vue running smoothly

What is actually happening?

Nothing

haoqunjiang commented 4 years ago

It's expected. The Preview panel will try to render HTML but it does not run JavaScript so it only shows the content of the <noscript> tag.

The full source code is shown in the Response tab.

babak-karimi-asl commented 4 years ago

i also have this problem when building for production , blank page with this error in response tab .

elizavetaanisimova commented 4 years ago

I have the same problem, Xcode Asks to enable javascript, how can I enable it?

babak-karimi-asl commented 4 years ago

my problem solved by replacing vue instantiation code in main.js with the following :

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');

one of my colleagues did this i don't know from where.

kkang386 commented 4 years ago

I had mine resolved. It was due to a CORS policy setting. You may want to check your server's CORS policy setting. For Django, it needs following to be set in the settings.py if CORs module is installed. CORS_ALLOW_ALL_ORIGINS = True

For Apache httpd, it maybe setup in the .htaccess like such: Header always set Access-Control-Allow-Origin *

Other servers may have different syntax or configurations.

actforjason commented 3 years ago

https://github.com/vuejs/vue-cli/issues/5470#issuecomment-669112550 It workes in my case!

Rastra17 commented 2 years ago

Thank you for your solution to this problem. Your method worked in my case which was using Django as backend and Vue.js as frontend.

hktalent commented 2 years ago

me too, is a bug

<strong>We're sorry but platform_serve doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>

When I disable the browser JS from safari and then re enable JS,

And the message will stay here forever

OMG-y commented 2 years ago

When I use spring boot to access third-party interfaces(another local login service),It is a bug with " We're sorry but xxx doesn't work properly without JavaScript enabled. Please enable it to continue."

it seems that resource is not got from third-party local service 14D5632B

alamhubb commented 2 years ago

我用vue-cli创建一个新项目,直接进行build,访问dist/index.html, 就提示这个

pickyouu commented 2 years ago

+1 We're sorry but app2 doesn't work properly without JavaScript enabled. Please enable it to continue. http://localhost:8080/js/app.js net::ERR_CONNECTION_RESET

CailynH commented 1 year ago

I change "history" to "hash" in the router mode, then the bug is resolved

ning2510 commented 1 year ago

my problem solved by replacing vue instantiation code in main.js with the following :

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');

one of my colleagues did this i don't know from where.

If this method doesn't work for you, try adding the following to the vue.config.js file:

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  ...
  publicPath: './',
  outputDir:'dist',
  assetsDir:'static'
})
yanchenghust commented 1 year ago

I change "history" to "hash" in the router mode, then the bug is resolved

it works for me too!