The npm module I'm using is cytoscape v2.7.13.
This worked great before upgrading my ember from 2.8 to 2.15.
At the time it was working fine, and I was using ember-browserify v1.1.13.
After upgrading ember-cli I followed up by upgrading ember-browserify:
npm install ember-browserify@^1.2.0
My component still has this line at top:
import cytoscape from "npm:cytoscape";
I have the following error:
Error: Could not find module 'npm:cytoscape' imported from 'ember-craft-repository/components/cyto-scape/component'
at missingModule (loader.js:247)
at findModule (loader.js:258)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at requireModule (loader.js:24)
at Class._extractDefaultExport (index.js:392)
at Class.resolveOther (index.js:113)
at Class.superWrapper [as resolveOther] (ember-utils.js:423)
at Class.resolve (resolver.js:164)
at resolve (container.js:873)
Troubleshooting steps I have taken:
- Fresh install by:
rm -rf tmp dist node_modules, npm cache clean, npm install
- I have tried moving the import directly under app/:
in a new file app/cytoscape.js:
import cytoscape from "npm:cytoscape";
export default cytoscape;
then in my component changed the line to import the above file.
Resulted in the same error i.e. couldn't import npm:cytoscape
Again, this wasn't an issue before in ember-cli version 2.8
And this seems to be the only problem I'm experiencing after the upgrade.