Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 /angular-2-local-storage not found and systemjs.config.js #20

Closed
ajitatif opened this issue Oct 13, 2016 · 2 comments
Closed

404 /angular-2-local-storage not found and systemjs.config.js #20

ajitatif opened this issue Oct 13, 2016 · 2 comments

Comments

@ajitatif
Copy link

Hi,

I had to add

map { 
    ..., 
    'angular-2-local-storage': 'npm:angular-2-local-storage/dist'
}, 

and

packages: {       
    ..., 
    'angular-2-local-storage': { main: './angular-2-local-storage.js', defaultExtension: 'js' } 
}

to get angular-2-local-storage work as documented.

Otherwise I got 404 for /angular-2-local-storage requests.

Using v0.0.20 from via npm install.

I'm relatively new to all this npm and SystmJS stuff (been living in a cave for about five years now) so I just wanted to know if this is a "it's not a bug, it's a feature" case.

@elwynelwyn
Copy link
Collaborator

We're using WebPack now with the latest angular-cli. However when we were on the older version, we had to add similar config to what you have above for most of our 3rd party dependencies.

I've updated the documentation to reflect this. For reference, here is the original notes from README.md:


Add the following to your map and packages arrays in src/system-config.ts:

    const map: any = {
        'angular-2-local-storage': 'vendor/angular-2-local-storage'
    };
    const packages: any = {
        'angular-2-local-storage': { main: 'index.js', defaultExtension: 'js' }
    };

And then add the following to vendorNpmFiles in angular-cli-build.js:

    vendorNpmFiles: [
        'angular-2-local-storage/**/*.js'
    ]

@aprocom
Copy link

aprocom commented Jun 8, 2017

For me with angular2 example project and systemjs works:

const map: any = {
'angular-2-local-storage': 'vendor/angular-2-local-storage/dist'
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants