Skip to content

Having dependencies in plugin output causes r.js to read non-existent files #463

@zr40

Description

@zr40

My base web app template (https://github.com/zr40/base-web-app) contains a single CoffeeScript source file (main.coffee) without dependencies. build.sh invokes r.js -o build.js, and this succeeds.

When I add any dependency to main.coffee (say, 'test', so that line 3 contains require ['test'], ->), r.js will try to read main.js. (This file name depends on the name of the depending file. If I would rename main.coffee to something.coffee, r.js will try to read something.js.)

This is the output:

~/dev/base-web-app % ./build.sh
~/dev/base-web-app/build/work/lib ~/dev/base-web-app
~/dev/base-web-app
Optimizing (standard) CSS file: /Users/zr40/dev/base-web-app/build/minified/css.css

Tracing dependencies for: almond
Error: ENOENT, no such file or directory '/Users/zr40/dev/base-web-app/build/minified/main.js'
In module tree:
    cs

Error: Error: ENOENT, no such file or directory '/Users/zr40/dev/base-web-app/build/minified/main.js'
In module tree:
    cs

    at Object.fs.openSync (fs.js:427:18)

~/dev/base-web-app %

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions