Module Not Found
Closed this issue ยท 7 comments
I'am using webpack and I got this error
ERROR in ../~/angular-spinner/angular-spinner.js Module not found: Error: Cannot resolve module 'spin' in /home/gabriel/Development/garavano/node_modules/angular-spinner @ ../~/angular-spinner/angular-spinner.js 132:2-38
I solved it by changing 'spin' to 'spin.js' in line 132
define(['angular', 'spin.js'], factory);
Is this an issue for anyone else?
I am using require/browserify to load angular-spinner and I had the same error. Your suggested fix worked for me.
For me it's a problem having define(['angular', 'spin.js'], factory);
in line 132 (see #63)
webpack user here, also had to change to define(['angular', 'spin.js'], factory);
Here's a solution for webpack that doesn't require modifying the package:
npm install --save-dev imports-loader
then in webpack.config.js
:
module: {
loaders: [
{
test: require.resolve('angular-spinner'),
loader: 'imports?define=>false' // disable AMD for this package
}
]
}
bump
Hi community folks,
We've decided to refactor the whole base code because of the many requests of webpack and amd compatibility issues, and we're using already webpack in master branch (+TypeScript).
You don't have those dependency issues anymore (once we publish new release)