Skip to content

Running "browserify:common" task >> Error: module "./hello" not found #23

Description

@LinnykS

Need use Browserify for CommonJS approach in Jasmine unit tests, which have been running with lineman. After running command:

$ lineman spec-ci

Have had next

Running "browserify:common" (browserify) task
Error: module "./hello" not found from "C:\cygwin64\NAP\app\js\entrypoint.coffee"
Warning: Error running grunt-browserify. Use --force to continue.

Versions:

"lineman": "0.36.6",
"browserify": "^4.0.0",
"lineman-browserify": "0.1.2"

"app/js/entrypoint.coffee" file contains:
window._ = require("underscore")
require("./hello")
Check the result of

$ lineman config browserify next:

{
  "common": {
    "files": {
      "<%= files.browserify.generated %>": "<%= files.browserify.entrypoint %>"
    },
    "options": {
      "debug": false,
      "extensions": [
        ".js",
        ".coffee"
      ],
      "transform": [
        "coffeeify"
      ],
      "aliasMappings": [
        {
          "cwd": "vendor/js",
          "src": "**/*.{js,coffee}",
          "dest": ""
        },
        {
          "cwd": "app/js",
          "src": "**/*.{js,coffee}",
          "dest": ""
        }
      ]
    }
  },
  "spec": {
    "files": {
      "<%= files.browserify.generatedSpec %>": [
        "<%= files.js.spec %>",
        "<%= files.coffee.spec %>"
      ]
    },
    "options": {
      "debug": false,
      "extensions": [
        ".js",
        ".coffee"
      ],
      "transform": [
        "coffeeify"
      ],
      "aliasMappings": [
        {
          "cwd": "vendor/js",
          "src": "**/*.{js,coffee}",
          "dest": ""
        },
        {
          "cwd": "app/js",
          "src": "**/*.{js,coffee}",
          "dest": ""
        },
        {
          "cwd": "spec",
          "src": "**/*.{js,coffee}",
          "dest": ""
        }
      ]
    }
  }
}

Also, its issue becomes when I'm trying to run
$ lineman build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions