ngokevin / angle

:clock430: A-Frame command-line tool for installing components and scaffolding templates.
https://www.npmjs.com/package/angle
MIT License
80 stars 20 forks source link

angle install #20

Closed 7dir closed 7 years ago

7dir commented 7 years ago
$ angle install aframe-alongpath-component index.html
Installing A-Frame component `aframe-alongpath-component` to `index.html`
Detected A-Frame version 0.5.0
C:\src\angle\lib\install.js:50
  if (moduleName in registry[version].components) {
                                     ^

TypeError: Cannot read property 'components' of undefined
    at Command.install (C:\src\angle\lib\install.js:50:38)
    at Command.listener (C:\src\angle\node_modules\commander\index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:191:7)
    at Command.parseArgs (C:\src\angle\node_modules\commander\index.js:615:12)
    at Command.parse (C:\src\angle\node_modules\commander\index.js:458:21)
    at Object.<anonymous> (C:\src\angle\index.js:23:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
7dir commented 7 years ago

so aframe-component should exist in npm packages!

perrychen901105 commented 6 years ago

@7dir Hello, I meet the same problem with your's, can you tell me how you fix this?

7dir commented 6 years ago

@perrychen901105 add some components

yarn add aframe-some-component

then import to index.js

import aframe-some-component

or add to index.html

<script src="aframe-some-component"></script>