首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >盖茨比失败的生产建设

盖茨比失败的生产建设
EN

Stack Overflow用户
提问于 2019-07-23 14:48:38
回答 2查看 2.7K关注 0票数 0

最近,盖茨比( Gatsby )开始无法构建该网站的生产版本。开发版本构建得很好。

这似乎是巴贝尔的问题,但我不知道是什么。我已经升级了所有的东西,删除了node_modules文件夹和yarn.lock,但是在重新构建所有东西之后,它也以同样的方式失败了。

我对内部的工作方式并不特别熟悉,所以我猜这与盖茨比提供的Babel设置有关吧?

代码语言:javascript
复制
 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@fortawesome/react-fontawesome/index.es.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/@fortawesome/react-fontawesome/index.es.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@mikaelkristiansson/domready/ready.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/@mikaelkristiansson/domready/ready.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@reach/router/es/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/@reach/router/es/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@reach/router/es/lib/utils.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/@reach/router/es/lib/utils.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby-link/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/gatsby-link/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby-react-router-scroll/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/gatsby-react-router-scroll/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/lodash/lodash.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/lodash/lodash.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/mitt/dist/mitt.es.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/mitt/dist/mitt.es.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/netlify-identity-widget/build/netlify-identity.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/netlify-identity-widget/build/netlify-identity.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/prop-types/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/prop-types/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/react-add-to-calendar/dist/react-add-to-calendar.min.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/react-add-to-calendar/dist/react-add-to-calendar.min.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/react-dom/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/react-dom/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/react-helmet/lib/Helmet.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/react-helmet/lib/Helmet.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/react-image-gallery/build/image-gallery.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/react-image-gallery/build/image-gallery.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/react-share/es/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/react-share/es/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/react/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/react/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

[BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/shallow-compare/es/index.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")

File: node_modules/shallow-compare/es/index.js


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Module build failed (from ./node_modules/gatsby/node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/css-loader/lib/css-base.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")
    at validateTopLevelOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:49:13)
    at normalizeOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:160:3)
    at _default (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js:168:37)
    at /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at loadDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:74:38)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:94:27)
    at loadFullConfig (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/transform.js:28:33)
    at process._tickCallback (internal/process/next_tick.js:61:11)

File: src/components/share.scss


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Module build failed (from ./node_modules/gatsby/node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/css-loader/lib/css-base.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")
    at validateTopLevelOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:49:13)
    at normalizeOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:160:3)
    at _default (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js:168:37)
    at /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at loadDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:74:38)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:94:27)
    at loadFullConfig (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/transform.js:28:33)
    at process._tickCallback (internal/process/next_tick.js:61:11)

File: node_modules/react-add-to-calendar/dist/react-add-to-calendar.css


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Module build failed (from ./node_modules/gatsby/node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/css-loader/lib/css-base.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")
    at validateTopLevelOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:49:13)
    at normalizeOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:160:3)
    at _default (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js:168:37)
    at /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at loadDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:74:38)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:94:27)
    at loadFullConfig (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/transform.js:28:33)
    at process._tickCallback (internal/process/next_tick.js:61:11)

File: node_modules/react-image-gallery/styles/css/image-gallery.css


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Module build failed (from ./node_modules/gatsby/node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/css-loader/lib/css-base.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")
    at validateTopLevelOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:49:13)
    at normalizeOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:160:3)
    at _default (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js:168:37)
    at /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at loadDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:74:38)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:94:27)
    at loadFullConfig (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/transform.js:28:33)
    at process._tickCallback (internal/process/next_tick.js:61:11)

File: src/templates/gallery.css


 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Module build failed (from ./node_modules/gatsby/node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/css-loader/lib/css-base.js: Invalid Option: corejs is not a valid top-level option.
        Maybe you meant to use 'targets'? (While processing: "/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js")
    at validateTopLevelOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:49:13)
    at normalizeOptions (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/normalize-options.js:160:3)
    at _default (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/preset-env/lib/index.js:168:37)
    at /Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at loadDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:74:38)
    at recurseDescriptors (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:94:27)
    at loadFullConfig (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/config/full.js:108:6)
    at process.nextTick (/Users/carlosbeneto/Documents/JS/lonely-lentil-site/node_modules/gatsby/node_modules/@babel/core/lib/transform.js:28:33)
    at process._tickCallback (internal/process/next_tick.js:61:11)

这是我的package.json:

代码语言:javascript
复制
  "dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.19",
"@fortawesome/free-solid-svg-icons": "^5.9.0",
"@fortawesome/react-fontawesome": "^0.1.4",
"bulma": "^0.7.5",
"core-js": "2",
"gatsby": "^2.13.31",
"gatsby-image": "^2.2.6",
"gatsby-plugin-google-analytics": "^2.1.4",
"gatsby-plugin-netlify": "^2.1.3",
"gatsby-plugin-netlify-cms": "^4.1.6",
"gatsby-plugin-netlify-cms-paths": "^1.2.2",
"gatsby-plugin-purgecss": "^3.1.1",
"gatsby-plugin-react-helmet": "^3.1.2",
"gatsby-plugin-sass": "^2.1.3",
"gatsby-plugin-sharp": "^2.2.8",
"gatsby-plugin-sitemap": "^2.2.3",
"gatsby-remark-copy-linked-files": "^2.1.3",
"gatsby-remark-images": "^3.1.6",
"gatsby-remark-relative-images": "^0.2.2",
"gatsby-source-filesystem": "^2.1.5",
"gatsby-transformer-remark": "^2.6.7",
"gatsby-transformer-sharp": "^2.2.4",
"lodash": "^4.17.15",
"lodash-webpack-plugin": "^0.11.4",
"netlify-cms-app": "^2.9.6",
"node-sass": "^4.12.0",
"parcel-bundler": "^1.12.3",
"prop-types": "^15.6.0",
"react": "^16.8.6",
"react-add-to-calendar": "^0.1.5",
"react-dom": "^16.8.6",
"react-facebook": "^7.0.6",
"react-helmet": "^5.2.1",
"react-image-gallery": "^0.8.18",
"react-share": "^2.4.0",
"uuid": "^3.2.1"

},

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-07-24 13:32:29

我不确定这对本地构建是否有帮助,但我今天在Netlify上部署时也遇到了同样的问题,我已经能够通过切换到npm来解决这个问题。

以下是我遵循的步骤:

  • 删除yarn.lock和旧package-lock.json
  • 添加yarn.lock,从.gitignore中删除package-lock.json
  • 删除node_modules文件夹
  • 用npm重新安装依赖项
  • 使用npm运行构建命令
票数 0
EN

Stack Overflow用户

发布于 2019-07-23 17:53:46

不确定这是否有用,但我遇到了与此相同的问题,并意识到我有一个package-lock.json和一个yarn.lock文件。我删除了我的yarn.lock文件,它修复了错误。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57166791

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档