Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix CI builds (Karma + PhantomJS) #4252

Closed
Assignees

Description

At the moment, npm test is failing in this repository. As a result, it's difficult to land pull requests with confidence.

ERROR [framework.browserify]: bundle error
ERROR [framework.browserify]: Error: Couldn't find preset "@babel/preset-env" 
 relative to directory "/home/travis/build/strongloop/loopback/node_modules/loopback-connector/node_modules/async/dist" 
 while parsing file: /home/travis/build/strongloop/loopback/node_modules/loopback-connector/node_modules/async/dist/async.js

Possible directions to investigate:

  • Upgrade Karma & plugins to their latest versions
  • Check Babel configuration
  • Replace PhantomJS with Headless Chrome, perhaps remove Babel from the setup too
Full log
Running "run:optionalInstall" (run) task
Considering PhantomJS found at /usr/local/bin/phantomjs
Found PhantomJS at /usr/local/bin/phantomjs ...verifying
Writing location.js file
PhantomJS is already installed on PATH at /usr/local/bin/phantomjs
+ karma-phantomjs-launcher@1.0.4
+ phantomjs-prebuilt@2.1.16
added 15 packages from 35 contributors in 11.778s

Running "karma:unit-once" (karma) task
[BABEL] Note: The code generator has deoptimised the styling of "/home/travis/build/strongloop/loopback/node_modules/lodash/lodash.js" as it exceeds the max of "500KB".
09 08 2019 09:35:06.313:ERROR [framework.browserify]: bundle error
09 08 2019 09:35:06.316:ERROR [framework.browserify]: Error: Couldn't find preset "@babel/preset-env" relative to directory "/home/travis/build/strongloop/loopback/node_modules/loopback-connector/node_modules/async/dist" while parsing file: /home/travis/build/strongloop/loopback/node_modules/loopback-connector/node_modules/async/dist/async.js
09 08 2019 09:35:06.413:INFO [karma-server]: Karma v4.2.0 server started at http://0.0.0.0:9876/
09 08 2019 09:35:06.414:INFO [launcher]: Launching browsers PhantomJS with concurrency unlimited
09 08 2019 09:35:06.417:INFO [launcher]: Starting browser PhantomJS
09 08 2019 09:35:10.642:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket XkEOlZnG3xq3qu2HAAAA with id 16887580
[BABEL] Note: The code generator has deoptimised the styling of "/home/travis/build/strongloop/loopback/node_modules/@sinonjs/text-encoding/lib/encoding-indexes.js" as it exceeds the max of "500KB".
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
Error: bundle error (see logs)
at /tmp/c2c20d926257fc7a9a690e2da3a7e580.browserify.js:1:43
PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (22.23 secs / 0 secs)
Warning: Task "karma:unit-once" failed. Use --force to continue.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /