0

Sorry to be a pain, I can imagine this question has appeared in the past - but despite trying various different fixes - I'm still not getting anywhere.

So I've set up Node, NPM, Express on my current server based off instructions from this Youtube clip https://www.youtube.com/watch?v=OhPFgqHz68o

I've switched on my node server using node server/index.js

Following this, in a new tab in my terminal I used cd server then npm install which then produced the following: npm WARN package.json [email protected] No description npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No README data

I then ran npm install grunt --save-dev, which then produced the following: npm WARN package.json [email protected] No description npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No README data [email protected] node_modules/grunt ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected]) ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) └── [email protected] ([email protected], [email protected])

Following this, I then ran grunt server which produced: A valid Gruntfile could not be found. Please see the getting started guide for more information on how to configure grunt: http://gruntjs.com/getting-started Fatal error: Unable to find Gruntfile.

However, I've looked inside my server folder on my computer and it contains grunt, inside node-modules > grunt > lib > grunt.js

Please help, I'm driving myself crazy.

1 Answers1

0

When you run grunt serve Grunt is looking for a file in the root directory called Gruntfile.js, this file is where you write all your Grunt tasks.

The file you found inside node_modules/grunt/lib/grunt.js is actually Grunt itself.

I recommend taking a read of the Getting Started guide that Grunt provides, it'll give you a clear idea of how to get set up correctly with Grunt and how to combine it with your project.

Martyn Davies
  • 1,493
  • 9
  • 12