question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Compodoc on Travis CI raise a module not found error

See original GitHub issue
Overview of the issue

When Travis CI starts my npm run docs, a module not found error is raised:

> rimraf docs && compodoc -t -p tsconfig.json -d docs -n "J2SE to JavaScript" --theme readthedocs --disableGraph --disablePrivateOrInternalSupport
module.js:487
    throw err;
    ^
Error: Cannot find module 'send'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/apuliasoft/j2se-js/node_modules/live-server/index.js:10:9)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! j2se-js@0.0.0-development docs: `rimraf docs && compodoc -t -p tsconfig.json -d docs -n "J2SE to JavaScript" --theme readthedocs --disableGraph --disablePrivateOrInternalSupport`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the j2se-js@0.0.0-development docs 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!     /home/travis/.npm/_logs/2017-07-19T17_02_56_193Z-debug.log
The command "npm run docs" exited with 1.
Operating System, Node.js, npm, compodoc version(s)
Operating System Details
   Distributor ID:	Ubuntu
   Description:	Ubuntu 12.04.5 LTS
   Release:	12.04
   Codename:	precise
Linux Version
   3.13.0-29-generic
$ node --version
v8.1.4
$ npm --version
5.0.3
$ compodoc --version
1.0.0-beta.13
Angular configuration, a package.json file in the root folder
{
  "name": "j2se-js",
  "version": "0.0.0-development",
  "description": "j2se-js : a JavaScript porting of j2se framework",
  "main": "src/index.ts",
  "directories": {
    "src": "src",
    "doc": "docs",
    "test": "test"
  },
  "scripts": {
    "commit": "git-cz",
    "test:watch": "mocha -r ts-node/register **/*.spec.ts --watch-extensions ts --watch",
    "test": "nyc -e .ts -x **/*.spec.ts mocha -r ts-node/register **/*.spec.ts",
    "coverage": "nyc report --reporter=text-lcov | coveralls",
    "docs": "rimraf docs && compodoc -t -p tsconfig.json -d docs -n \"J2SE to JavaScript\" --theme readthedocs --disableGraph --disablePrivateOrInternalSupport",
    "build": "rimraf dist && tsc --project tsconfig.prod.json",
    "build-dev": "rimraf dist && tsc --project tsconfig.dev.json",
    "lint": "tslint -p tsconfig.dev.json",
    "postinstall": "",
    "semantic-release": "semantic-release pre && npm publish && semantic-release post"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/apuliasoft/j2se-js.git"
  },
  "keywords": [
    "j2se",
    "java",
    "util"
  ],
  "author": "ApuliaSoft <info@apuliasoft.com>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/apuliasoft/j2se-js/issues"
  },
  "homepage": "https://github.com/apuliasoft/j2se-js#readme",
  "devDependencies": {
    "@compodoc/compodoc": "1.0.0-beta.13",
    "@types/chai": "~4.0.0",
    "@types/mocha": "~2.2.0",
    "chai": "~4.1.0",
    "commitizen": "~2.9.0",
    "coveralls": "~2.13.0",
    "cz-conventional-changelog": "~2.0.0",
    "mocha": "~3.4.0",
    "mocha-lcov-reporter": "~1.3.0",
    "nyc": "~11.0.0",
    "rimraf": "~2.6.0",
    "semantic-release": "~6.3.0",
    "ts-loader": "~2.3.0",
    "ts-node": "~3.2.0",
    "tslint": "~5.5.0",
    "typescript": "~2.4.0"
  },
  "config": {
    "commitizen": {
      "path": "node_modules/cz-conventional-changelog"
    }
  }
}

Compodoc installed globally or locally ?

locally

Motivation for or Use Case

I want to build documentation automatically and deploy on GitHub Pages for each commit.

Suggest a Fix

I suggest to remove live-server dependency if -s option is not set.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vogloblinskycommented, Jul 20, 2017

@nsanitate could reproduce the bug. I have downgraded the dependency of live-server. Between now and next 1.0.0-beta.14 compodoc release, you could add a npm-shrinkwrap.json file to override live-server version. Just tested on your repo, works fine :

{
  "dependencies": {
    "live-server": {
      "version": "1.1.0"
    }
  }
}
0reactions
lock[bot]commented, Oct 1, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - I'm getting the Travis CI Build Error "Module not found ...
I'm getting "Module not found" errors for my Travis CI build. I'm not sure exactly why but here's a look at my initial...
Read more >
Common Build Problems - Travis CI Docs
Common Build Problems · My tests broke but were working yesterday · My build script is killed without any error · My build...
Read more >
angular/angular-cli - Gitter
So I am getting this error: Error:(54, 33) TS2686:'fabric' refers to a UMD global, but the current file is a module ...
Read more >
@storybook/addon-actions | Yarn - Package Manager
Bug Fixes. HTML: Fix missing ability to set docs.extractArgTypes #18831; CLI: Throw error on failure in sb init #18816; CLI: Hook up the...
Read more >
generator-angular2-library - npm package - Snyk
Looks like generator-angular2-library is missing a security policy. ... creates and configures .gitignore , .npmignore and .travis.yml; creates the main ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found