Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE_ENV #25

Open
davthu opened this issue Jun 20, 2019 · 1 comment
Open

NODE_ENV #25

davthu opened this issue Jun 20, 2019 · 1 comment

Comments

@davthu
Copy link

davthu commented Jun 20, 2019

It would be great if it was possible to set the NODE_ENV variable with this plugin. I tried like this but did not work:

task installNPM(type: NodeJsTask) {
    require = ["npm"]
    executable = "npm"
    args = ['NODE_ENV=production', 'install', '--no-save']
}
@davthu
Copy link
Author

davthu commented Jun 20, 2019

I tried out another task that did not work:

task runSetup(type: NodeJsTask) {
    require = ["node"]
    executable = "node"
    args = ['NODE_ENV=production']
}
task installNPM(type: NodeJsTask, dependsOn: [runSetup]) {
    require = ["npm"]
    executable = "npm"
    args = ['install', '--no-save']
}

Gives an error:

Execution failed for task:
> Process 'command '/opt/.nodejs/10.15.0/bin/npm'' finished with non-zero exit value 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant