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.










share|improve this question
























  • 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















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.










share|improve this question
























  • 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













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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

What visual should I use to simply compare current year value vs last year in Power BI desktop

How to ignore python UserWarning in pytest?

Alexandru Averescu