This is part of a simplified test example that can be found at https://github.com/dara76/node-serve-jspm-test
I have the following in my index.html
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
System.trace = true;
System.import('./app/main');
</script>
where main.js is
console.log('main.js');
import React from 'react';
I get the following error
Uncaught (in promise) Error: (SystemJS) Module http://localhost:3000/app/main.js interpreted as global module format, but called System.register.
If I remove the import React from 'react' statement from main.js there is no error and the console.log executes.
How can I avoid getting the above error?