Open itzg opened 3 years ago
I'm seeing a similar issue on Mac 11.15. NPM 7.7.6, Node 15.14.0. I've even tried downgrading to nwb@0.24.7 with these steps with the same issue:
$ npm install --global nwb@0.24.7
...
$ nwb --version
v0.24.7
$ nwb new react-component nwb-rc-0.24.7
(accept default settings)
$ cd nwb-rc-0.24.7
$ yarn
...
$ yarn test
yarn run v1.22.10
warning ../package.json: No license field
$ nwb test-react
START:
16 08 2021 13:30:25.090:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
16 08 2021 13:30:25.092:INFO [launcher]: Launching browsers PhantomJS with concurrency unlimited
16 08 2021 13:30:25.118:INFO [launcher]: Starting browser PhantomJS
16 08 2021 13:30:26.536:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket Bi_5BjhCWHKLs639AAAA with id 98992079
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
TypeError: Object is not a constructor (evaluating 'getPolyfill()')
at webpack:///node_modules/reflect.getprototypeof/index.js:10:1 <- tests/index.test.js:35482:33
Finished in 0.228 secs / 0 secs @ 13:39:34 GMT-0400 (Eastern Daylight Time)
SUMMARY:
✔ 0 tests completed
Karma exit code was 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I found a project on github that completes its tests. It is using nwb 0.23.0.
git clone https://github.com/ucscXena/XenaGoWidget.git 2400727b6d5ec90b7a7a87703155c1cbe61c24a5
cd XenaGoWidget
npm install
npm run test
Blindly updating to 0.25.2 in package.json failed with a different, but seemingly related error:
√ XenaGoWidget % npm run test
> ucsc-xena-geneset@0.3.3-SNAPSHOT test
> NODE_OPTIONS=--max_old_space_size=4096 nwb test-react --timeout 20000
nwb config report for /Users/markeklund/play/XenaGoWidget/nwb.config.js
Error
✖ babel.runtime = 'polyfill'
Must be an Object (to configure transform-runtime options) or false (to disable use of the runtime-transform plugin)
I see there is a commit that changed from PhantomJS to ChromeHeadless. I tried changing the above to use it instead and got the same polyfill error. But when I reverted to 0.23.0, ChromeHeadless worked marvelously.
I see that the latest bleeding code has removed polyfill, so hopefully @insin is already has a fix for this in the next release.
I've gotten past the issue. It looks like a new release will help. This is what I did to accomplish it:
cd node_modules
rm -rf nwb
git clone https://github.com/insin/nwb.git
cd nwb
yarn
yarn build
chmod a+x ../.bin/nwb
cd ../..
yarn test
This issue is a:
This issue is reproducible with the repository
https://github.com/itzg/try-nwb-react-component
however, it contains completely out of the box content from
nwb new react-component
other than the modifiedREADME.md
nwb is installed globally and the following transcript show how the
npm run test
fails with no modifications on my part.Added
DEBUG=nwb
and now it fails in a different way prior to karma invocation:This might be a duplicate of https://github.com/insin/nwb/issues/496 ; however, that issue has gone dormant and this current is easily reproducible.