Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
Grails 3 accessing node_modules

Starting on a Grails 3 app and trying to use a node plugin. My custom javascript is located under grails-app/assets/javascripts but when I run gradle build it installs the node_modules folder under my root project directory. This folder has all my JS libraries and I'm unable to access them from my within grails-app/assets/javascripts.

Is there a way to install node_modules under grails-app? Do I need to specify the directory in my build.gradle?

Here's my node and grunt plugins in my build.gradle.

classpath "com.moowork.gradle:gradle-node-plugin:0.12" classpath "com.moowork.gradle:gradle-grunt-plugin:0.12"

apply plugin:"com.moowork.node" apply plugin:"com.moowork.grunt"

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can change the location of the node_modules folder.

First, upgrade the node and grunt plugins to version 0.13

classpath "com.moowork.gradle:gradle-node-plugin:0.13"
classpath "com.moowork.gradle:gradle-grunt-plugin:0.13"

Second, add the following to your build.gradle file:

node { nodeModulesDir = file("grails-app") }

This will create the node_modules folder under grails-app (i.e. grails-app/node_modules)

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!