- Check whether the js file is successfully imported in the developer tools.
- If it is not in the developer tools, check whether the user has at least design permission for this js file.
As a workaround, you could add a script editor web part into the list AllItems page and insert the code into it directly.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.