Cannot run grunt command because of error: cannot find module 'liftoff'
up vote
2
down vote
favorite
I'm starting a simple HTML project with Bootstrap 4 where I want to use compiled sass. To do this I've installed grunt using node.js and later steps described on https://gruntjs.com/getting-started.
When I'm typing grunt
command the result is:
Error: Cannot find module 'liftoff' at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:Bitnaminodejs-7.3.0-0nodejsnode_modulesgrunt-clibingrunt:7:15)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
I've tried to figure out this by installing npm install liftoff
. This module was installed properly but still I cannot run grunt
.
My gruntfile.js looks like this:
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
watch: {
sass: {
files: ['sass/**', 'Gruntfile.js'],
tasks: ['sass'],
},
uglify: {
files: ['js/index.js', 'Gruntfile.js'],
tasks: ['uglify'],
}
},
sass: {
production: {
options: {
compress: true,
strictUnits: true
},
files: {
'styles.css': 'styles/styles.sass',
}
}
},
uglify: {
options: {
beautify: true,
mangle: false,
compress: {
drop_console: true
}
},
build: {
files: {
'index.min.js': ['js/index.js'],
}
}
}
});
grunt.registerTask('default', ['css', 'js']);
grunt.registerTask('css', ['sass']);
grunt.registerTask('js', ['uglify']);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
};
What am I missing? I'm quite new to npm grunt so maybe solution is simple but I didn't find answer strictly related to 'liftoff' module. I'm trying to do this on Windows 7. Thanks for any help.
windows npm sass gruntjs
add a comment |
up vote
2
down vote
favorite
I'm starting a simple HTML project with Bootstrap 4 where I want to use compiled sass. To do this I've installed grunt using node.js and later steps described on https://gruntjs.com/getting-started.
When I'm typing grunt
command the result is:
Error: Cannot find module 'liftoff' at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:Bitnaminodejs-7.3.0-0nodejsnode_modulesgrunt-clibingrunt:7:15)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
I've tried to figure out this by installing npm install liftoff
. This module was installed properly but still I cannot run grunt
.
My gruntfile.js looks like this:
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
watch: {
sass: {
files: ['sass/**', 'Gruntfile.js'],
tasks: ['sass'],
},
uglify: {
files: ['js/index.js', 'Gruntfile.js'],
tasks: ['uglify'],
}
},
sass: {
production: {
options: {
compress: true,
strictUnits: true
},
files: {
'styles.css': 'styles/styles.sass',
}
}
},
uglify: {
options: {
beautify: true,
mangle: false,
compress: {
drop_console: true
}
},
build: {
files: {
'index.min.js': ['js/index.js'],
}
}
}
});
grunt.registerTask('default', ['css', 'js']);
grunt.registerTask('css', ['sass']);
grunt.registerTask('js', ['uglify']);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
};
What am I missing? I'm quite new to npm grunt so maybe solution is simple but I didn't find answer strictly related to 'liftoff' module. I'm trying to do this on Windows 7. Thanks for any help.
windows npm sass gruntjs
Since I didn't get the answer I've found out that any project on this computer has problem with grunt. And the error is the same. So it must be a global problem, not only with this project. I've reinstalled node.js and grunt but it didn't work. :( I've installed gulp and everything is ok.
– nymphais
Nov 27 at 14:20
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm starting a simple HTML project with Bootstrap 4 where I want to use compiled sass. To do this I've installed grunt using node.js and later steps described on https://gruntjs.com/getting-started.
When I'm typing grunt
command the result is:
Error: Cannot find module 'liftoff' at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:Bitnaminodejs-7.3.0-0nodejsnode_modulesgrunt-clibingrunt:7:15)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
I've tried to figure out this by installing npm install liftoff
. This module was installed properly but still I cannot run grunt
.
My gruntfile.js looks like this:
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
watch: {
sass: {
files: ['sass/**', 'Gruntfile.js'],
tasks: ['sass'],
},
uglify: {
files: ['js/index.js', 'Gruntfile.js'],
tasks: ['uglify'],
}
},
sass: {
production: {
options: {
compress: true,
strictUnits: true
},
files: {
'styles.css': 'styles/styles.sass',
}
}
},
uglify: {
options: {
beautify: true,
mangle: false,
compress: {
drop_console: true
}
},
build: {
files: {
'index.min.js': ['js/index.js'],
}
}
}
});
grunt.registerTask('default', ['css', 'js']);
grunt.registerTask('css', ['sass']);
grunt.registerTask('js', ['uglify']);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
};
What am I missing? I'm quite new to npm grunt so maybe solution is simple but I didn't find answer strictly related to 'liftoff' module. I'm trying to do this on Windows 7. Thanks for any help.
windows npm sass gruntjs
I'm starting a simple HTML project with Bootstrap 4 where I want to use compiled sass. To do this I've installed grunt using node.js and later steps described on https://gruntjs.com/getting-started.
When I'm typing grunt
command the result is:
Error: Cannot find module 'liftoff' at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:Bitnaminodejs-7.3.0-0nodejsnode_modulesgrunt-clibingrunt:7:15)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
I've tried to figure out this by installing npm install liftoff
. This module was installed properly but still I cannot run grunt
.
My gruntfile.js looks like this:
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
watch: {
sass: {
files: ['sass/**', 'Gruntfile.js'],
tasks: ['sass'],
},
uglify: {
files: ['js/index.js', 'Gruntfile.js'],
tasks: ['uglify'],
}
},
sass: {
production: {
options: {
compress: true,
strictUnits: true
},
files: {
'styles.css': 'styles/styles.sass',
}
}
},
uglify: {
options: {
beautify: true,
mangle: false,
compress: {
drop_console: true
}
},
build: {
files: {
'index.min.js': ['js/index.js'],
}
}
}
});
grunt.registerTask('default', ['css', 'js']);
grunt.registerTask('css', ['sass']);
grunt.registerTask('js', ['uglify']);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
};
What am I missing? I'm quite new to npm grunt so maybe solution is simple but I didn't find answer strictly related to 'liftoff' module. I'm trying to do this on Windows 7. Thanks for any help.
windows npm sass gruntjs
windows npm sass gruntjs
edited Nov 27 at 14:22
asked Nov 21 at 9:24
nymphais
112
112
Since I didn't get the answer I've found out that any project on this computer has problem with grunt. And the error is the same. So it must be a global problem, not only with this project. I've reinstalled node.js and grunt but it didn't work. :( I've installed gulp and everything is ok.
– nymphais
Nov 27 at 14:20
add a comment |
Since I didn't get the answer I've found out that any project on this computer has problem with grunt. And the error is the same. So it must be a global problem, not only with this project. I've reinstalled node.js and grunt but it didn't work. :( I've installed gulp and everything is ok.
– nymphais
Nov 27 at 14:20
Since I didn't get the answer I've found out that any project on this computer has problem with grunt. And the error is the same. So it must be a global problem, not only with this project. I've reinstalled node.js and grunt but it didn't work. :( I've installed gulp and everything is ok.
– nymphais
Nov 27 at 14:20
Since I didn't get the answer I've found out that any project on this computer has problem with grunt. And the error is the same. So it must be a global problem, not only with this project. I've reinstalled node.js and grunt but it didn't work. :( I've installed gulp and everything is ok.
– nymphais
Nov 27 at 14:20
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53408846%2fcannot-run-grunt-command-because-of-error-cannot-find-module-liftoff%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Since I didn't get the answer I've found out that any project on this computer has problem with grunt. And the error is the same. So it must be a global problem, not only with this project. I've reinstalled node.js and grunt but it didn't work. :( I've installed gulp and everything is ok.
– nymphais
Nov 27 at 14:20