我试图安装问题而安装咕噜临界CSS
须藤NPM安装咕噜临界CSS --save-dev的
Password:**********
我一直得到
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN [email protected] requires a peer of [email protected]~0.4.2 but none was installed.
我'已经试过
须藤NPM更新-g NPM
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/lib
└── [email protected]
须藤NPM安装-g咕噜-CLI
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
/usr/local/lib
└── [email protected]
须藤NPM安装咕噜临界CSS --save -dev
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN [email protected] requires a peer of [email protected]~0.4.2 but none was installed.
我在这里做错了什么?有人可以填写我错过的内容吗?
详细
npm v3.8.7
grunt-cli v1.2.0
grunt v1.0.1
Gruntfile.js
criticalcss: {
custom: {
options: {
url: "http://localhost:8888",
width: 1200,
height: 900,
outputfile: "public/dist/wedding/css/critical.css",
filename: "public/dist/wedding/css/all.css",
buffer: 800*1024,
ignoreConsole: false
}
}
},
加载
grunt.loadNpmTasks('grunt-critical-css');
说它
grunt.registerTask('default', [
'clean:dist',
'concat',
'uglify',
'cssmin',
// 'htmlmin',
'compress',
'criticalcss'
]);
RESULT
咕噜
Warning: Task "criticalcss" not found. Use --force to continue.
Aborted due to warnings.
咕噜--force
Warning: Task "criticalcss" not found. Used --force, continuing.
Done, but with warnings.
去检查一个文件
Nothing generated
好的,让我试试看。谢谢。 – ihue
我试着更新npm和grunt,然后再次尝试安装,'sudo npm install grunt-critical-css --save-dev'仍然有同样的错误。 'npm WARN弃用[email protected]:这个软件包已经重新集成到npm中,现在已经过时了npm npm WARN [email protected]需要[email protected]~0.4.2的同行,但没有一个是已安装。 – ihue
@ihue什么是你当前版本的nodeJS,npm,grunt?看起来像所有安装成功...它只是警告信息 – semanser