问题
I'm trying to install react-bootstrap-datetimepicker with jspm and I'm getting this error:
$ jspm install npm:react-bootstrap-datetimepicker
Password:
Looking up npm:react-bootstrap-datetimepicker
Updating registry cache...
Downloading npm:react-bootstrap-datetimepicker@0.0.21
Looking up npm:babel-runtime
Looking up npm:classnames
Looking up npm:moment
Looking up npm:react-bootstrap
Looking up npm:react
Downloading npm:classnames@2.1.5
Downloading npm:react-bootstrap@0.16.1
Downloading npm:moment@2.10.6
warn Error on download for npm:react-bootstrap-datetimepicker
Error: ENOENT, link '/Users/me/.jspm/packages/npm/react-bootstrap-datetimepicker@0.0.21/react-bootstrap-datetimepicker/lib/DateTimeField.js'
at Error (native)
err Error downloading npm:react-bootstrap-datetimepicker.
warn Installation changes not saved.
I can see that it's failing because there is no directory react-bootstrap-datetimepicker
in
/Users/me/.jspm/packages/npm/react-bootstrap-datetimepicker@0.0.21/
.
However, there is
/Users/me/.jspm/packages/npm/react-bootstrap-datetimepicker@0.0.21/lib/DateTimeField.js
.
Does the react-bootstrap-datetimepicker code need to be modified so that it will work with jspm? Any other ideas what is causing this?
I logged an issue here.
回答1:
Looks like the problem is solved:
jspm install npm:react-bootstrap-datetimepicker
Looking up npm:react-bootstrap-datetimepicker
Updating registry cache...
Downloading npm:react-bootstrap-datetimepicker@0.0.21
Looking up npm:babel-runtime
Looking up npm:classnames
Looking up npm:moment
Looking up npm:react-bootstrap
Looking up npm:react
Downloading npm:classnames@2.2.0
Downloading npm:react@0.14.1
Looking up npm:envify
Looking up npm:fbjs
Downloading npm:react-bootstrap@0.16.1
ok Installed npm:moment@^2.8.2 (2.10.6)
ok Installed npm:classnames@^2.1.2 (2.2.0)
Looking up github:jspm/nodelibs-process
Downloading npm:envify@3.4.0
Looking up npm:through
Looking up npm:jstransform
Downloading npm:fbjs@0.3.2
Looking up npm:core-js
Looking up npm:loose-envify
Looking up npm:promise
Looking up npm:ua-parser-js
Looking up npm:whatwg-fetch
ok Installed npm:envify@^3.0.0 (3.4.0)
Downloading npm:through@2.3.8
Looking up github:jspm/nodelibs-assert
Looking up github:systemjs/plugin-json
Downloading npm:promise@7.0.4
Looking up npm:asap
Downloading npm:whatwg-fetch@0.9.0
Downloading npm:ua-parser-js@0.7.9
Downloading npm:jstransform@10.1.0
Looking up npm:base62
Looking up npm:esprima-fb
Looking up npm:source-map
Looking up github:jspm/nodelibs-path
Looking up github:jspm/nodelibs-fs
ok Installed npm:through@~2.3.4 (2.3.8)
ok Installed npm:whatwg-fetch@^0.9.0 (0.9.0)
Looking up npm:process
Downloading npm:asap@2.0.3
Downloading npm:source-map@0.1.31
Looking up npm:amdefine
Downloading npm:base62@0.1.1
ok Installed npm:ua-parser-js@^0.7.9 (0.7.9)
ok Installed npm:promise@^7.0.3 (7.0.4)
Downloading npm:esprima-fb@13001.1001.0-dev-harmony-fb
Looking up npm:assert
Looking up github:jspm/nodelibs-stream
Downloading npm:loose-envify@1.1.0
Looking up npm:js-tokens
Downloading npm:amdefine@1.0.0
Looking up npm:path-browserify
ok Installed npm:asap@~2.0.3 (2.0.3)
Looking up npm:util
ok Installed npm:jstransform@^10.0.1 (10.1.0)
ok Installed npm:base62@0.1.1 (0.1.1)
Looking up github:jspm/nodelibs-domain
Looking up npm:inherits
ok Installed npm:amdefine (1.0.0)
ok Installed npm:fbjs@^0.3.1 (0.3.2)
ok Installed npm:loose-envify@^1.0.0 (1.1.0)
Downloading github:jspm/nodelibs-domain@0.1.0
Downloading npm:js-tokens@1.0.2
Looking up npm:stream-browserify
Looking up github:jspm/nodelibs-module
ok Installed github:jspm/nodelibs-stream@^0.1.0 (0.1.0)
Looking up npm:readable-stream
Looking up github:jspm/nodelibs-util
Looking up npm:domain-browser
Downloading github:jspm/nodelibs-module@0.1.0
ok Installed npm:react (0.14.1)
ok Installed npm:stream-browserify@^1.0.0 (1.0.0)
ok Installed npm:esprima-fb@13001.1001.0-dev-harmony-fb (13001.1001.0-dev-harmony-fb)
Looking up github:jspm/nodelibs-events
Downloading npm:domain-browser@1.1.4
ok Installed npm:js-tokens@^1.0.1 (1.0.2)
Looking up npm:core-util-is
Looking up npm:isarray
Looking up npm:string_decoder
ok Installed npm:source-map@0.1.31 (0.1.31)
ok Installed npm:readable-stream@^1.0.27-1 (1.1.13)
ok Installed npm:react-bootstrap@^0.16.1 (0.16.1)
ok Installed npm:isarray@0.0.1 (0.0.1)
ok Installed npm:domain-browser@^1.1.3 (1.1.4)
ok Installed npm:core-util-is@~1.0.0 (1.0.1)
ok Installed npm:string_decoder@~0.10.0 (0.10.31)
Looking up github:jspm/nodelibs-buffer
ok Installed github:jspm/nodelibs-domain@^0.1.0 (0.1.0)
Looking up npm:events
ok Installed github:jspm/nodelibs-events@^0.1.1 (0.1.1)
ok Installed npm:events@1.0.2 (1.0.2)
ok Installed github:jspm/nodelibs-module@^0.1.0 (0.1.0)
Looking up npm:buffer
ok Installed github:jspm/nodelibs-buffer@^0.1.0 (0.1.0)
Looking up npm:base64-js
Looking up npm:ieee754
Looking up npm:is-array
ok Installed npm:buffer@^3.0.1 (3.5.1)
ok Installed npm:ieee754@^1.1.4 (1.1.6)
ok Installed npm:is-array@^1.0.1 (1.0.1)
ok Installed npm:base64-js@0.0.8 (0.0.8)
ok Installed react-bootstrap-datetimepicker as npm:react-bootstrap-datetimepicker@^0.0.21 (0.0.21)
ok Install tree has no forks.
ok Install complete.
Running with jspm@0.16.3 on a newly-initialized project.
回答2:
It turns out this was a bug in jspm/npm. Here's the issue.
来源:https://stackoverflow.com/questions/33158793/error-installing-an-npm-library-with-jspm