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

Unit Tests don't work with A-Frame 1.2.0+ #5

Open
diarmidmackenzie opened this issue Oct 2, 2022 · 1 comment
Open

Unit Tests don't work with A-Frame 1.2.0+ #5

diarmidmackenzie opened this issue Oct 2, 2022 · 1 comment

Comments

@diarmidmackenzie
Copy link
Member

This PR gets all examples working with A-Frame 1.3.0.

However if we upgrade the version of A-Frame used in devDependencies past 1.1.0, we get browserify build errors when we run npm run test

To reproduce:

In package.json, devDependencies update A-Frame dependency like this:

"aframe": "^1.2.0",

run npm install
run npm test run

We get a long series of errors, starting like this:

C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system>npm run test

> aframe-physics-system@4.0.1 test
> karma start ./tests/karma.conf.js

Deprecated private createPreprocessor() API
02 10 2022 12:28:30.426:INFO [preprocessor.env]: Publishing variables:  [ 'TEST_ENV' ]
02 10 2022 12:28:30.447:INFO [framework.browserify]: registering rebuild (autoWatch=true)
02 10 2022 12:28:34.492:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.492:ERROR [framework.browserify]: Error: Cannot find module './debug' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'
02 10 2022 12:28:34.494:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.495:ERROR [framework.browserify]: Error: Cannot find module './GetIntrinsic' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'
02 10 2022 12:28:34.496:INFO [framework.browserify]: bundle updated
02 10 2022 12:28:34.496:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.497:ERROR [framework.browserify]: Error: Cannot find module '../GetIntrinsic' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'
02 10 2022 12:28:34.498:INFO [framework.browserify]: bundle updated
02 10 2022 12:28:34.498:ERROR [framework.browserify]: bundle error
02 10 2022 12:28:34.499:ERROR [framework.browserify]: Error: Cannot find module './helpers/assertRecord' from 'C:\Users\ASUS\Documents\GitHub\AframeCommunity\aframe-physics-system\node_modules\aframe\dist'

Not yet undersood what change from A-Frame 1.1.0 to 1.2.0 causes this, or how to fix it.

@vincentfretin
Copy link
Member

I'll look into it once #3 is merged. I'll switch to webpack like I did for aframe and networked-aframe, it should be quick to do for me now that I have the experience.

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

2 participants