My code isn't working, I am getting an error: Uncaught TypeError: Cannot read property 'addEventListener' of null How to make this code work?
<!DOCTYPE html>
<html>
<head>
<title>Fashion Closet</title>
</head>
<body>
<header>
<h1>Fashion Closet</h1>
<p>Unique look for daily routine</p>
</header>
</body>
<div>
<button id="create-look">Create a new look</button>
</div>
<script src="/scripts/bundle.js"></script>
</html>
and here is JS, with the eventListener which throws error by execution
import uuidv4 from 'uuid/v4'
// defining the looks array
let looks = []
// creating a new look
const createLook = () => {
const lookId = uuidv4()
looks.push({
id: lookId,
title: ''
})
saveLooks()
return lookId
}
// Creating an event listener
document.getElementById("#create-look").addEventListener("click", (e) => {
//calling a function
const id = createLook()
location.assign(`/looks.html#${id}`)
})