[SalesForce] Unable to load 3rd party lib in Lightning Web Component

I'm trying to import a 3rd party javascript library from static resources in my lightning web component.
I followed the exemple given in LWC documentation.

I encounter the folowing error :

Uncaught (in promise) TypeError: Cannot read property 'Symbol(ViewModel)' of undefined

Uncaught (in promise) TypeError: m is not a function

My sample code :

import loadScript from 'lightning/platformResourceLoader';
import fuse from '@salesforce/resourceUrl/fuse';

export default class SelectActivity extends LightningElement {

    fuseLoaded = false;

    renderedCallback() {
        if(!this.fuseLoaded){
            console.log(fuse);
            loadScript(this,fuse + "/fuse.js")
                .then( () => {
                    this.fuseLoaded = true;
                })
                .catch( error => console.log(error));

        }

    }
}

And my static resource is present :

Static resource

Thank you in advance

Best Answer

You are passing a path variable in your loadScript call (/fuse.js) which is required when you want to load a file inside an archive When you upload the javascript file directly (which is the case based on your screenshot) you only pass the import identifier as 2nd argument

loadScript(this,fuse)
Related Topic