dougludlow / ng2-bs3-modal

Angular Bootstrap 3 Modal Component
http://dougludlow.github.io/ng2-bs3-modal/
ISC License
261 stars 133 forks source link

Install fails #5

Closed julia-string closed 8 years ago

julia-string commented 8 years ago

When running npm install ng2-bs3-modal I get the following error. Is there anything I'm doing wrong?

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ng2-bs3-modal"
npm ERR! node v5.6.0
npm ERR! npm  v3.7.2
npm ERR! code ELIFECYCLE

npm ERR! ng2-bs3-modal@0.1.1 postinstall: `npm run peer`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ng2-bs3-modal@0.1.1 postinstall script 'npm run peer'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ng2-bs3-modal package,
npm ERR! not with npm itself.

npm-debug.log.zip

dougludlow commented 8 years ago

I'm getting the same thing, weird. Looking into it now.

julia-string commented 8 years ago

Ah I see, thank you!

dougludlow commented 8 years ago

@julia-string should be good now. Give it a try and let me know how it goes.

julia-string commented 8 years ago

You're a star! Thank you!

dougludlow commented 8 years ago

:+1:

julia-string commented 8 years ago

Sorry, one more thing: I get UNMET PEER DEPENDENCY bootsrap@3.3 but I'm running on bootstrap@3.3.6.

dougludlow commented 8 years ago

I've recently added the peer dependency and I may have botched the semver syntax. Lemme take look into that as well.

dougludlow commented 8 years ago

Oh man... I fat fingered bootstrap... had it in there as bootsrap. Thanks for catching my mistakes! Should be good to go in v0.1.3.

Thanks again!

julia-string commented 8 years ago

Cool! That worked now, thank you! Sorry to be such a bugger. The import path still seems wrong, it doesn't find the correct file when using import { MODAL_DIRECTIVES } from 'ng2-bs3-modal'; but instead returns ng2-bs3-modal:1 Uncaught SyntaxError: Unexpected token <. I tried different paths also.

dougludlow commented 8 years ago

hmm... try import { MODAL_DIRECTIVES } from "ng2-bs3-modal/dist/ng2-bs3-modal";

julia-string commented 8 years ago

Yeah, I tried that too, but then it throws the same error (likely a different cause), when including the directive MODAL_DIRECTIVES.

dougludlow commented 8 years ago

@julia-string how are you transpiling/loading your scripts? systemjs?

rsnider19 commented 8 years ago

I might be having the same issue as @julia-string . I have import {MODAL_DIRECTIVES} from 'ng2-bs3-modal/dist/ng2-bs3-modal'; and am using SystemJS, but I am getting a 404 when the browser looks for http://localhost:12345/ng2-bs3-modal/dist/ng2-bs3-modal

dougludlow commented 8 years ago

@rsnider19 it sounds like I need to take a better look and the npm install flow.

rsnider19 commented 8 years ago

Thanks! In the meantime, I think I'll just add the components to my project so that I can start using them.

dougludlow commented 8 years ago

:+1:

nhhockeyplayer commented 8 years ago

Nice share dude... love the way you manhandled (implements) that interface deep within angular2 like a JAVA PRO. Time to step into the fast lane... : )

Flea505 commented 8 years ago

@dougludlow Any progress on the "SyntaxError: Unexpected token < " when using the following import... import {MODAL_DIRECTIVES} from 'ng2-bs3-modal/dist/ng2-bs3-modal';??

dougludlow commented 8 years ago

@Flea505 none, yet... I'm on a family vacation right now. But I'll probably have some time to look into it this weekend.

dougludlow commented 8 years ago

This should be fixed now in 0.1.4. Please give it a go and let me know if you have any issues.

You'll need to change the import path to the following:

import { MODAL_DIRECTIVES } from "ng2-bs3-modal/ng2-bs3-modal";

Also, if you're loading your scripts manually (not using something like systemjs), I've added bundles/ng2-bs3-modal.js which you can include directly from node_modules, if desired.

<script src="/node_modules/ng2-bs3-modal/bundles/ng2-bs3-modal.js"></script>
Flea505 commented 8 years ago

Thanks! I'll give it a go on Monday.

Felicia Chavez Tempus Nova Cell 505 401 4415 Google Voice 505-386-0168 Felicia.chavez@tempusnova.com

On Mar 5, 2016, at 8:38 AM, Douglas Ludlow notifications@github.com wrote:

This should be fixed now in 0.1.4. Please give it a go and let me know if you have any issues.

You'll need to change the import path to the following:

import { MODAL_DIRECTIVES } from "ng2-bs3-modal/ng2-bs3-modal"; Also, if you're loading your scripts manually (not using something like systemjs), I've added bundles/ng2-bs3-modal.js which you can include directly from node_modules, if desired.

— Reply to this email directly or view it on GitHub.