简体   繁体   中英

VS Code just renders Javascript file as Text using Live Server Extension

I just started to learn and practice ReactJS. however, when I first set up ReactJS along with the npm and node.js it worked fine. But today, whenever I want to access the index.js (a sample code from my-app for React) it just outputs the text in my browser. I have tried reinstalling both VS Code and Live Server Extension and still doesn't work.

截屏

Inside your project file, you just need to run:

npm i

npm start

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM