Cannot use import statement outside a module in node.js
I was working on the project on model.js file, then after that I need to import model.js file to Shareplace.js file. But after that the problem occurs into the console browser "Cannot use import statement outside a module". This is my Shareplace.js file code: import {modal} from '../src/UI/modal'; class PlaceFinder { constructor() { const AddressForm = document.querySelector('form'); const locateUserButton = document.getElementById('locate-btn'); locateUserButton.addEventListener('click',this.locateUserHandler); AddressForm.addEventListener('submit',this.findAddressHandler); } locateUserHandle
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.