纱线开始不工作

编程入门 行业动态 更新时间:2024-09-25 22:28:01

<a href=https://www.elefans.com/category/jswz/34/1770322.html style=纱线开始不工作"/>

纱线开始不工作

我一直在尝试制作这个 React 应用程序,但是当我尝试这样做时

yarn start
它显示以下错误消息:

yarn run v1.22.17
$ react-scripts start
node:internal/modules/cjs/loader:488
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.2.0
error Command failed with exit code 1.
info Visit  for documentation about this command.

我该如何解决这个问题?

这就是现在显示的:

Starting the development server...

/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:417:16)
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:452:10
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:323:13
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.2.0
error Command failed with exit code 1.
info Visit  for documentation about this command.
回答如下:
  1. 删除了/node_modules 和yarn.lock 文件。 2.然后使用yarn install重新安装删除的包/文件。

更多推荐

纱线开始不工作

本文发布于:2024-06-16 07:23:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1771444.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:纱线   工作

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!