在 mac os 中安装 grind 框架时遇到错误
Facing error during grind framework installation in mac os
我是磨框架新手。我按照下面url中描述的步骤进行安装。
https://grind.rocks/docs/0.7/guides/installation
安装已成功完成,当我尝试使用以下命令 运行 项目时,出现了下面描述的致命错误。
命令:
$ bin/cli watch
错误:
Mac-iMac-1s-iMac:project-name Mac-imac-1$ bin/cli watch
Watching app,config
Failed to start Error: Plugin 0 specified in "/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-preset-grind/index.js" provided an invalid property of "default" (While processing preset: "/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-preset-grind/index.js")
at Plugin.init (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/plugin.js:131:13)
at Function.normalisePlugin (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
at /Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at /Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
at /Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
at Array.map (<anonymous>)
at OptionManager.resolvePresets (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
我遇到过这个问题,所以根据我的意见,您必须按如下所述更改软件包版本。
在 package.json 文件中找到“devDependencies”部分,您可以在其中看到 "babel-preset-grind":“^0.8.0-beta.1”。我们需要删除包的测试版。
"babel-preset-grind": "^0.8.0-beta.1" to "babel-preset-grind": "0.7.0"
然后需要从您的终端执行以下命令。
$ npm install
$bin/cli watch
我是磨框架新手。我按照下面url中描述的步骤进行安装。
https://grind.rocks/docs/0.7/guides/installation
安装已成功完成,当我尝试使用以下命令 运行 项目时,出现了下面描述的致命错误。
命令:
$ bin/cli watch
错误:
Mac-iMac-1s-iMac:project-name Mac-imac-1$ bin/cli watch
Watching app,config
Failed to start Error: Plugin 0 specified in "/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-preset-grind/index.js" provided an invalid property of "default" (While processing preset: "/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-preset-grind/index.js")
at Plugin.init (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/plugin.js:131:13)
at Function.normalisePlugin (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
at /Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
at Array.map (<anonymous>)
at Function.normalisePlugins (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at /Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
at /Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
at Array.map (<anonymous>)
at OptionManager.resolvePresets (/Users/Mac-imac-1/Desktop/demoes/project-name/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
我遇到过这个问题,所以根据我的意见,您必须按如下所述更改软件包版本。
在 package.json 文件中找到“devDependencies”部分,您可以在其中看到 "babel-preset-grind":“^0.8.0-beta.1”。我们需要删除包的测试版。
"babel-preset-grind": "^0.8.0-beta.1" to "babel-preset-grind": "0.7.0"
然后需要从您的终端执行以下命令。
$ npm install
$bin/cli watch