Coder Social home page Coder Social logo

Comments (14)

asbjornh avatar asbjornh commented on June 2, 2024 1

@teknologist I'm getting the same error.
@Ziinc Deleting node_modules and reinstalling did not resolve the issue.

chimp/dist/lib/mocha/mocha-wrapper.js has two references to 6.X.X babel packages:

Line 8:

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

Line 20:

require('../babel-register');

../babel-register.js imports babel-register and babel-polyfill.

These references probably have to be replaced with @babel/runtime, @babel/register and @babel/polyfill in order for chimp to work with babel 7

from chimp.

philcruz avatar philcruz commented on June 2, 2024

I am also having a problem running chimp 0.51 after upgrade to meteor 1.6.1

I run meteor in full test mode with
meteor test --full-app --driver-package tmeasday:acceptance-test-driver --settings config/config.json

in another terminal I run chimp with
chimp config/chimp.js --ddp=http://localhost:3000 --mocha --path=tests

Chimp version:  0.51.0
ChromeDriver version:  ChromeDriver 2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e)
Java version:  java version "1.8.0_92", Java(TM) SE Runtime Environment (build 1.8.0_92-b14), Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
Selenium version:  3.4.0
Selenium drivers version:  chrome: 2.29, ie: 3.0.0, firefox: 0.19.1
OS version:  Darwin 16.7.0
Node version:  v8.9.4
Browser version:  chrome 63.0.3239.132

Chrome launches but it just blank. The terminal output says: "Error: Timeout of 90000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves."

npm logs https://www.screencast.com/t/EmW4ZAIa2

from chimp.

teknologist avatar teknologist commented on June 2, 2024

@philcruz Do you have a .babelrc in your project ?

from chimp.

teknologist avatar teknologist commented on June 2, 2024

Ok, removing .babelrc from my meteor project fixes the issue.

So until this is fixed I will just temporarily remove .babelrc prior to running my chimp tests on CI...

Maybe there should be a way to run chimp, ignoring local .babelrc, with something like babels --no-babelrc

from chimp.

philcruz avatar philcruz commented on June 2, 2024

@teknologist No, I don't have a .babelrc in my project.

from chimp.

d1sco avatar d1sco commented on June 2, 2024

Having this problem myself with no .babelrc in my package.json

from chimp.

Ziinc avatar Ziinc commented on June 2, 2024

@philcruz try to run chimp with --debug and --mochaTimeout=120000. You should be able to see the underlying reason why you're getting that error.

from chimp.

philcruz avatar philcruz commented on June 2, 2024

I switched to using a fork of practicalmeteor:mocha, cultofcoders:mocha as discussed practicalmeteor/meteor-mocha#100 Now my tests are running again.

from chimp.

teknologist avatar teknologist commented on June 2, 2024

@philcruz this is not related to this issue

from chimp.

Ziinc avatar Ziinc commented on June 2, 2024

@teknologist Could you run chimp in debug mode? with the --debug flag. Would be able to see the steps that chimp is taking before the error occurs.

from chimp.

teknologist avatar teknologist commented on June 2, 2024

@Ziinc thanks for your answer.
Running with --debug This is the error I am getting now:

Chimp version:  0.51.1
ChromeDriver version:  Unknown. Chromedriver not used directly.
Java version:  java version "1.8.0_121", Java(TM) SE Runtime Environment (build 1.8.0_121-b13), Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixedmode)
Selenium version:  3.10.0
Selenium drivers version:  chrome: 2.36, ie: 3.8, firefox: 0.20.0
OS version:  Darwin 17.4.0
Node version:  v8.9.4
Browser version:  chrome 65.0.3325.181

[chimp] Running...
/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-wrapper.js:75
    throw e;
    ^

Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.0". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or"babel-core" to see what is calling Babel.
    at throwVersionError (/Volumes/DEV/Dev/Doctrine/doctrine-frontoffice/node_modules/@babel/helper-plugin-utils/lib/index.js:62:11)
    at Object.assertVersion (/Volumes/DEV/Dev/Doctrine/doctrine-frontoffice/node_modules/@babel/helper-plugin-utils/lib/index.js:11:11)
    at /Volumes/DEV/Dev/Doctrine/doctrine-frontoffice/node_modules/@babel/plugin-proposal-decorators/lib/index.js:20:7
    at /Volumes/DEV/Dev/Doctrine/doctrine-frontoffice/node_modules/@babel/helper-plugin-utils/lib/index.js:16:12
    at Function.memoisePluginContainer (/usr/local/lib/node_modules/chimp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:113:13)
    at Function.normalisePlugin (/usr/local/lib/node_modules/chimp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:146:32)
    at /usr/local/lib/node_modules/chimp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/usr/local/lib/node_modules/chimp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/usr/local/lib/node_modules/chimp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/usr/local/lib/node_modules/chimp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at compile (/usr/local/lib/node_modules/chimp/node_modules/babel-register/lib/node.js:103:45)
    at loader (/usr/local/lib/node_modules/chimp/node_modules/babel-register/lib/node.js:144:14)
    at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/chimp/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at /usr/local/lib/node_modules/chimp/node_modules/mocha/lib/mocha.js:231:27
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/usr/local/lib/node_modules/chimp/node_modules/mocha/lib/mocha.js:228:14)
    at Mocha.run (/usr/local/lib/node_modules/chimp/node_modules/mocha/lib/mocha.js:536:10)
    at new MochaWrapper (/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-wrapper.js:71:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-wrapper-instance.js:5:20)
Mocha failed
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] test:chimp:chrome:local: `TESTHOST=localhost chimp .scripts/chimp-config.js --mocha --debug  --chai --ddp=http://localhost:18303 --path=tests --browser=chrome --screenshotsOnError=true`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] test:chimp:chrome:local script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/eric/.npm/_logs/2018-03-29T13_54_21_123Z-debug.log

from chimp.

Ziinc avatar Ziinc commented on June 2, 2024

@teknologist This shouldn't be a issue with meteor as v1.6.1 already has Babel 7. Could be an issue with your node_modules cache... the babel version that the mocha-wrapper depends on might not be updated.
Try to eliminate the node_modules folder and reinstall the dependencies with meteor npm install.

from chimp.

vincro avatar vincro commented on June 2, 2024

to the response of @asbjornh I would add the need to amend the presets in babel-register need to point to @babel/preset-env and @babel/preset-stage-2.

Having edited the above mentioned files + amended the presets as I mentioned, It was able to get chimp up and running successfully.

require('@babel/register')({ 'presets': [ '@babel/preset-env', [ "@babel/preset-stage-2", { "decoratorsLegacy": true } ] });

from chimp.

samhatoum avatar samhatoum commented on June 2, 2024

This issue is being tracked in Chimpy
https://github.com/TheBrainFamily/chimpy/issues

from chimp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.