我想使用grunt-contrib-jasmineNPM包.它有各种依赖.依赖图的一部分如下所示:
?? grunt-contrib-jasmine@0.4.1
? ??? grunt-lib-phantomjs@0.2.0
? ? ??? phantomjs@1.8.2-2
Run Code Online (Sandbox Code Playgroud)
不幸的是,这个版本中存在一个错误phantomjs,导致它无法在Mac OS X上正确安装.这在最新版本中已得到修复.
我怎样才能grunt-lib-phantomjs使用更新的版本phantomjs?
一些额外的背景:
grunt-contrib-jasmine明确要求版本"~0.2.0"的grunt-lib-phantomjs,其中明确要求版本"~1.8.1"的phantomjs.phantomjs到我的包的依赖项没有任何效果; 两个版本都已安装并grunt-contrib-jasmine仍然使用旧版本(请参阅:使用NPM安装软件包时,是否可以告诉它使用其中一个依赖项的不同版本?).我正在尝试在 ReactJS 应用程序中使用 tailwindCSS
package.json这些是文件中的脚本命令
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject"
}
Run Code Online (Sandbox Code Playgroud)
这是我的craco.config.js
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
Run Code Online (Sandbox Code Playgroud)
当我使用npm run start命令时,我遇到这个错误
TypeError: match.loader.options.plugins is not a function
at extendsPostcss (C:\Development\Open Source\Learning Hub\react\node_modules\@craco\craco\lib\features\webpack\style\postcss.js:54:51)
at overrideLoader (C:\Development\Open Source\Learning Hub\react\node_modules\@craco\craco\lib\features\webpack\style\postcss.js:97:9)
at C:\Development\Open Source\Learning Hub\react\node_modules\@craco\craco\lib\features\webpack\style\postcss.js:118:13
at Array.forEach (<anonymous>)
at overridePostcss (C:\Development\Open Source\Learning Hub\react\node_modules\@craco\craco\lib\features\webpack\style\postcss.js:117:17)
at overrideStyle (C:\Development\Open Source\Learning Hub\react\node_modules\@craco\craco\lib\features\webpack\style\style.js:9:25)
at mergeWebpackConfig (C:\Development\Open Source\Learning …Run Code Online (Sandbox Code Playgroud)