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

bitecs require fails on hubs-cloud branch #5642

Closed
justincolangelo opened this issue Aug 7, 2022 · 7 comments
Closed

bitecs require fails on hubs-cloud branch #5642

justincolangelo opened this issue Aug 7, 2022 · 7 comments
Labels
bug needs triage For bugs that have not yet been assigned a fix priority

Comments

@justincolangelo
Copy link

Description
npm run build fails after fresh clone/branch of hubs-cloud is chosen. Master branch has the package in the package.json for bitecs. The hubs-cloud branch may either need to have that also installed, or networked-aframe and aframe packages patched for this difference. The peer dependency is not installed when using hubs-cloud branch.

ERROR in ./node_modules/aframe/src/core/a-entity.js
Module not found: Error: Can't resolve 'bitecs' in 'hubs/node_modules/aframe/src/core'
 @ ./node_modules/aframe/src/core/a-entity.js 15:48-65
 @ ./node_modules/aframe/src/index.js
 @ ./src/scene.js

ERROR in ./node_modules/networked-aframe/src/components/networked.js
Module not found: Error: Can't resolve 'bitecs' in 'hubs/node_modules/networked-aframe/src/components'
 @ ./node_modules/networked-aframe/src/components/networked.js 9:42-59
 @ ./node_modules/networked-aframe/src/index.js
 @ ./src/hub.js

To Reproduce
Steps to reproduce the behavior:

  1. Clone Hubs
  2. Use Node v16 or 14 or 12
  3. Checkout hubs-cloud branch
  4. npm ci
  5. npm run build

Expected behavior
The code compiles.

Hardware

  • Device: Macbook Pro M1
  • OS: OSX 12.2.1
  • Browser: n/a
@justincolangelo justincolangelo added bug needs triage For bugs that have not yet been assigned a fix priority labels Aug 7, 2022
@netpro2k
Copy link
Contributor

netpro2k commented Aug 7, 2022

Hmm this is surprising, the version of aframe and network-aframe pointed at by the hubs-cloud branch should not yet have the bitecs dependency...

@justincolangelo
Copy link
Author

Hmm this is surprising, the version of aframe and network-aframe pointed at by the hubs-cloud branch should not yet have the bitecs dependency...

I thought so, too. It seems https://github.com/mozilla/hubs/blob/hubs-cloud/package.json#L111 and https://github.com/mozilla/hubs/blob/hubs-cloud/package.json#L78 are pointing at master which both require bitecs?

@netpro2k
Copy link
Contributor

netpro2k commented Aug 7, 2022

Right but package-lock.json in the hubs cloud branch is pointing at a pre-bitecs commits for aframe and networked-aframe, so npm ci should be using those versions:

    "aframe": {
      "version": "github:mozillareality/aframe#2cd12e184bbf7e1ff7d2100d66064f50403405c1",
...
      },
...
    "networked-aframe": {
      "version": "github:mozillareality/networked-aframe#2c3c394e3f12a7d2cc68b193c0f7c94d709a46e8",
...
    },

Is your local lockfile getting changed somehow? Note that until #5619 you should technically be using node 10.16.1. We recognized most people don't want to use such an ancient version of node (ourselves included) and that we were long overdue for an upgrade, but that won't be landing until next month's Hubs Cloud release.

@justincolangelo
Copy link
Author

The node version is in fact on the older side, and yes, we did start using 12 at one point, then 14.19.3. The issue is definitely on us since we tried so hard not to use v10. I suppose this could be closed if that is the case. Losing a package lock shouldn't happen, but if it does it can be detrimental.

@netpro2k
Copy link
Contributor

netpro2k commented Aug 8, 2022

Just want to confirm it works for you if you run on the older node version. If it does then yeah, you won't have to live with it much longer as the release in a few weeks will include the node/webpack update. (You can probably pull form master and start using it now if you are feeling adventurous, I don't know of any backend changes that happened that would make it incomparable)

@justincolangelo
Copy link
Author

I would close this one. I'll do that. I'd like to start using 16.16.0 from the master branch. Maybe we will try that soon. We have 14.20.0 working so if I have some time I'll branch and break it. Thanks for looking at this.

@wmurphyrd
Copy link
Contributor

I hit this as well. If you npm install to add or update a package, npm may give you the latest master versions of aframe/naf due to the way they are listed in package.json. If this happens, npm ci should fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage For bugs that have not yet been assigned a fix priority
Projects
None yet
Development

No branches or pull requests

3 participants