【问题标题】:Facing error during grind framework installation in mac os在 mac os 中安装研磨框架时遇到错误
【发布时间】:2019-01-22 10:55:05
【问题描述】:

我是新来的框架。我按照以下网址中描述的步骤进行安装。

https://grind.rocks/docs/0.7/guides/installation

安装成功完成,当我尝试使用以下命令运行项目时,它给了我下面描述的致命错误。

命令:

$ bin/cli 观看

错误:

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)

【问题讨论】:

    标签: node.js frontend backend


    【解决方案1】:

    我遇到过这个问题,所以根据我的观点,你必须按照下面提到的那样更改包版本。

    在 package.json 文件中找到“devDependencies”部分,您可以看到“babel-preset-grind”:“^0.8.0-beta.1”。我们需要删除包的 beta 版本。

    “babel-preset-grind”:“^0.8.0-beta.1”到“babel-preset-grind”:“0.7.0”

    然后需要从终端执行以下命令。

    $ npm install
    $bin/cli watch
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多