I'm trying to install the bootstrap-wysiwyg package in my ES6 project using JSPM.
Usually you can just install a package using the command
jspm install npm:bootstrap-wysiwyg
And JSPM will take care of the config.js
file and create the entry JS file in the jspm_packages
folder.
For this particular package, it does create the config.js
entry to the bootstrap-wysiwyg JS file in the root directory, but it does not create that JS file itself.
Config.js
"bootstrap-wysiwyg": "npm:[email protected]",
Import
import stuff from 'bootstrap-wysiwyg';
Error message
GET http://localhost:9000/jspm_packages/npm/[email protected] 404 (Not Found)
How can I make sure JSPM creates that file? I could make one myself, but then version control is obviously broken.
The module your are trying to import is missing "main" entry in its package.json: https://github.com/steveathon/bootstrap-wysiwyg/blob/master/package.json Therefore, JSPM cannot create the main import. You have to either import files directly from the module (i.e. import stuff from 'bootstrap-wysiwyg/js/smth') or create an override for this package which will define "main" for the package (https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm#testing-configuration).