16 This question already has answers here: ES2015 import doesn’t work (even at top-level) in Firefox (8 answers) Closed 2 years ago.
I am trying to use a plugin called “Simplebar” found on GitHub, GitHub SimpleBar but after downloading the scripts and looking at the simple.js script, it looks like it has an error “SyntaxError: import declarations may only appear at top level of a module”
At the top of the simplebar.js file there are some import lines of code:
import scrollbarWidth from 'scrollbarwidth' import debounce from 'lodash.debounce' import './simplebar.css'
If I look in my browser debugger I see an error: “SyntaxError: import declarations may only appear at top level of a module”.
Has anyone tried to us this plugin.
Many thanks in advance for your time.
Related Posts:
- Can I use complex HTML with Twitter Bootstrap’s Tooltip?
- How do I redirect to another webpage?
- Invariant Violation: Objects are not valid as a React child
- How to get all place details from a Place Details Request using Google Places API Web Service?
- How do I check whether a checkbox is checked in jQuery?
- SyntaxError: Unexpected token o in JSON at position 1
- What does the function then() mean in JavaScript?
- How can I merge properties of two JavaScript objects dynamically?
- Heroku: “No default language could be detected for this app” error thrown for node app
- Loop inside React JSX
- Can’t resolve module (not found) in React.js
- Invalid shorthand property initializer
- nodejs – error self signed certificate in certificate chain
- How do I loop through or enumerate a JavaScript object?
- Getting Unexpected Token Export
- Setting a backgroundImage With React Inline Styles
- Filter array to have unique values
- What’s the difference between “Array()” and “[]” while declaring a JavaScript array?
- Mouseover & Mouseout w/ Javascript
- Format JavaScript date as yyyy-mm-dd
- Programmatically change the src of an img tag
- Unable to preventDefault inside passive event listener
- JavaScript variable assignments from tuples
- jQuery $.cookie is not a function
- Scroll Automatically to the Bottom of the Page
- npm WARN … requires a peer of … but none is installed. You must install peer dependencies yourself
- How do I check if string contains substring?
- What does “export default” do in JSX?
- Cannot find module ‘internal/fs’ after upgrading to node 7
- How can I select an element by name with jQuery?
- How can I group data with an Angular filter?
- Async/await in componentDidMount to load in correct order
- Dynamically load JS inside JS
- Tainted canvases may not be exported
- Error: Cannot find module html
- Is it possible to append to innerHTML without destroying descendants’ event listeners?
- How to sort an object array by date property?
- React router not showing browser history
- How to define DO NOTHING in JavaScript
- How to get the difference between two arrays in JavaScript?
- What happened to Lodash _.pluck?
- Simplest/cleanest way to implement a singleton in JavaScript
- Extract hostname name from string
- How to connect signalR from angularJs
- How can I copy to clipboard in HTML5 without using flash?
- how to get the value of a textarea in jquery?
- Maximum call stack size exceeded on npm install
- What counts as CPU Intensive tasks (eg. sorting, searching etc?)
- HTML make text clickable without making it a hyperlink
- Uncaught ReferenceError: React is not defined
- How to get the browser viewport dimensions?
- Getting HTML form values
- How to run a function when the page is loaded?
- RegEx: How can I match all numbers greater than 49?
- Multiple left-hand assignment with JavaScript
- Disabled href tag
- How to get child element by class name?
- TypeError getElementsByTagName is not a function issue
- Creating Accordion Table with Bootstrap
- Creating Multiple Modals on a Single Page
- jQuery checkbox checked state changed event
- Javascript, viewing [object HTMLInputElement]
- Why onbeforeunload event is not firing
- etect the Enter key in a text input field
- Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (
) - What’s the equivalent of Java’s Thread.sleep() in JavaScript?
- What do the args for Gutenberg subpackage “hooks” function “doAction” mean?
- How do I fire a snackbar notice in admin?
- Insert shortcode in post editor from javascript (Visual / HTML)
- Block editor: How to check if block editor has initialized and populated the data store?
- Contact Form 7 – Give each checkbox a class?
- is_page not working when loading javascript with add_action in functions.php
- Hide reply button after moveForm is called
- Detect When User Reads Full Article? [closed]
- How to add custom javascript into from custom plugin
- remove inline scripts from the_content() produced by plugins?
- How to set callback to execute after all the tinyMCE editors have been initialized?
- How to add classes and events to image in javascript using Gutenberg?
- Correctly enqueue scripts of type=text/paperscript (PaperJs Library)
- useSelect second parameter
- Javascript in wordpress
- How do I make my wordpress post appear in a mouse hover preview?
- Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page [closed]
- How to inherit custom javascript from parent to child pages?
- jQuery UI Tools: Scrollable: More than 1 instance possible?
- imporing HTML+javascript from REST API
- how to add a custom javascript file to our theme
- Check if user can in javascript
- Why does my array sort order changes when I pass it to JS using WP_REST_Response?
- WordPress Guternberg Content For React Native
- Custom block update rendering when reused
- VisualComposer/WPBakery Page Editor: Is any JS event triggered after the Edition pop-in is shown?
- How do I add my own scripts to the add_action(‘wp_enqueue_scripts’) function?
- Post title and url not showing on google map marker [closed]
- Including js script at end of header
- contact form 7 javascript and wpcf7_before_send_mail action
- Trigger a function during onload
- Embed Kajabi into WP
- Google AdSense Ad not showing up in WordPress Blog [closed]
- Use add_action to run a script, but only on the post editor page