Cannot use import statement outside a module | Unexpected Token Import | Unexplected Token Export
Vložit
- čas přidán 5. 09. 2024
- Cannot use import statement outside a module | Unexpected Token Import | Unexplected Token Import | ES6 Javascript | Dr Vipin Classes
About this video:
In this video, I explained about following topics:
1. How to remove error "cannot use import statement outside a module" in ES6 Javascript while compiling with node?
2. How to remove error "cannot use import statement outside a module" in ES6 Javascript while using with HTML?
#javascript, #es6
My Other Playlists
1. Data Structure using Golang
• Golang Data Structure ...
2. Web Development using Golang
• Golang Web Development
3. Go / Golang Tutorials
• Go Tutorial (Golang) f...
4. Kotlin Android Tutorials
• Android with Kotlin
5. Spring Boot Tutorials
• Spring Boot Tutorial
6. Spring Framework
• Spring Framework Tutorial
7. JavaScript ES 6
• JavaScript ES6 for Lea...
8. Java Features
• Functional Programming...
9. Seaborn Python
• Seaborn Python Tutorial
10. Firebase with Kotlin
• Android Firebase with ...
11. Kotlin Android Jetpack Library & MVVM
• Android Jetpack with K...
12. Kotlin SQLite and ROOM API Tutorials
• Android ROOM & SQLite ...
13. Java Tutorials
• Android with Java
14. MongoDB for Beginners
• MongoDB Tutorial for B...
15. Java Multi-Threading
• Multithreading with J...
16. Java File Handling
• File Handling in Java ...
17. Node JS for Beginners
• Node JS Tutorial for B...
18. Kotlin for Beginners
• Kotlin Tutorial for Be...
SUMMARY: change the file names to .mjs instead of .js for both the files that involve the import/export process. This worked for me using visual studio code. Thanks for the video!
Thanks for watching
Thanks for this video
Your Welcome...
thank you sir i was really confused
Welcome again
Genuinely worked
Thanks
Thank you so much. I spent an hour trying to fix but no avail. Your video saved me 🙏🏾
Thank for watching also
I still cannot but didn't watch the video yet.
thank you, i was stuck on this error and this is the video that helped me solve it, bless you
Thanks
Thanks 🌻
Sir please make a video on unexpected token error in reactjs
Not working. Chrome giving me CORS policy error. Advise please.
You need to sent CORS properties in header, read more about setting CORS using JavaScript.
@@drvipinclassess I have same problem, and i use only two file js ( with pure js and html)