Skip to content

'assets:precompile' does not install devDependencies  #1751

Closed
@paulgeisler

Description

@paulgeisler

What's the reason behind installing node modules only from 'dependencies' through the '--production' flag?

system "yarn install --no-progress --frozen-lockfile --production"

I do have some dependencies which are needed to build the app and are declared as 'devDependencies' (for example 'sass-resources-loader'). Another mate had to put all the testing clobber into 'dependencies' because the modules were missing in the test environment (after 'assets:precompile' ) which is semantically wrong.

It was really confusing and hard to find out because i've never experienced this routine for installing/building JS apps. There are always the 'yarn / npm install' commands in the instructions.

Usually there are a lot of transpilers in 'devDependencies' (babel, coffeescript, pug ...) so how does it work without them or should those be moved to 'dependencies' 🤔❓

It's not even analogue to Rails 5.1 yarn:install.
https://github.com/rails/rails/blob/v5.1.2/railties/lib/rails/tasks/yarn.rake#L4
system("./bin/yarn install --no-progress")

I would appreciate some clarification (and maybe a little lesson about dependencies declaration). 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions