npm build error (on Netlify) using @babel parser

问题描述 投票:0回答:0

我最近遇到了很多关于 babel 解析器的问题(主要是配置文件)。现在,我在 Netlify 上遇到错误:

3:56:37 AM: Installing npm packages using npm version 8.19.4
3:56:41 AM: npm ERR! code E404
3:56:41 AM: npm ERR! 404 Not Found - GET https://registry.npmjs.org/@babel%2fbabel-eslint - Not found
3:56:41 AM: npm ERR! 404
3:56:41 AM: npm ERR! 404  '@babel/babel-eslint@^10.1.0' is not in this registry.
3:56:41 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
3:56:41 AM: npm ERR! 404
3:56:41 AM: npm ERR! 404 Note that you can also install from a
3:56:41 AM: npm ERR! 404 tarball, folder, http url, or git url.
3:56:41 AM: npm ERR! A complete log of this run can be found in:
3:56:41 AM: npm ERR!     /opt/buildhome/.npm/_logs/2023-04-02T07_56_38_140Z-debug-0.log
3:56:41 AM: Error during npm install
3:56:41 AM: Build was terminated: dependency_installation script returned non-zero exit code: 1
3:56:41 AM: Failing build: Failed to install dependencies
3:56:41 AM: Finished processing build request in 13.806s

我的

babel.config.js
文件(
node_modules/@expo/webpack-config/template/babel.config.js
)看起来像这样:

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["@babel/babel-preset-expo", "@babel/preset-env", "@babel/preset-react"],
  };
};

有人见过这个吗?或者知道解决方法?任何形式的帮助将不胜感激。

javascript react-native npm babeljs netlify
© www.soinside.com 2019 - 2024. All rights reserved.