calipho-sib / feature-viewer

Library to visualize protein sequence features in javascript using D3 - From SIB CALIPHO group; neXtProt project
http://calipho-sib.github.io/feature-viewer/examples/
Other
110 stars 31 forks source link

Error on var FeatureViewer = require('feature-viewer') #65

Closed tkakar closed 2 years ago

tkakar commented 2 years ago

When I try to import the library using Error on var FeatureViewer = require('feature-viewer') I get the following error. Can anyone please help me? ... node_modules/bootstrap/js/src/tooltip.js:8 import * as Popper from '@popperjs/core' ^^^^^^ SyntaxError: Cannot use import statement outside a module Tried installing different versions of popper and bootstrap but still got the error.

kwsamarasinghe commented 2 years ago

You have to do it as import { createFeature } from "feature-viewer" for ES2015 or const { createFeature } = require("feature-viewer") for node apps.