GithubHelp home page GithubHelp logo

Comments (6)

ccloli avatar ccloli commented on May 18, 2024 3

请确认已参考 文档 在 hosts 文件中(一般是 /etc/hosts)添加如下配置

127.0.0.1 local.netease.com

若修改后仍未生效,请确认是否是本地存在代理软件劫持了请求,导致无法使用 hosts 文件里的解析

from tango.

ljxok2001 avatar ljxok2001 commented on May 18, 2024 2

谢谢 @ccloli ,通过 NODE_OPTIONS="--openssl-legacy-provider" yarn start 成功启动了,很棒。

另外,提醒一下未来的朋友们,要关掉 vpn 或者在 vpn 客户端中忽略掉对 local.netease.com 的代理,不然访问不了。

from tango.

wwsun avatar wwsun commented on May 18, 2024

端口冲突?或是使用 vpn ?

from tango.

OMGVecchio avatar OMGVecchio commented on May 18, 2024

Error: getaddrinfo ENOTFOUND local.netease.com
网络不通,local.netease.com 这个域名应该在系统内部有集成到,你在 hosts 里映射到 127.0.0.1 应该就可以了

from tango.

ljxok2001 avatar ljxok2001 commented on May 18, 2024

谢谢 @wwsun @OMGVecchio @ccloli 的回复,按照指引 local.netease.com 这个域名我已经配置好,并可以在浏览器访问了,上面我提到的问题已经不存在,不过在执行 yarn start 的时候,又遇到了一个新的问题,导致启动不了:

sudo yarn start
yarn run v1.22.19
$ yarn workspace playground start
$ HTTPS=1 umi dev
Starting the development server...

● Webpack █████████████████████████ building (10%) 1/2 modules 1 active
 babel-loader › src/.umi/umi.ts

(node:78457) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports.__webpack_modules__.57442.module.exports (/Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:135907:62)
    at NormalModule._initBuildHash (/Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109317:16)
    at /Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109352:10
    at /Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109223:13
    at /Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61151:11
    at /Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61017:18
    at context.callback (/Users/www/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:60895:13)
    at /Users/www/node_modules/@umijs/deps/compiled/babel-loader/index.js:1:130029 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.5.0
✨  Done in 3.56s.

from tango.

ccloli avatar ccloli commented on May 18, 2024

Node.js v20.5.0

这应该是 Node.js 17+ 从 OpenSSL 2.0 改为使用 OpenSSL 3.0,而当前脚手架使用的 webpack 版本使用了 OpenSSL 3.0 中废弃的方法导致的

webpack/webpack#14532

请尝试降级至 Node.js 16 再启动试试看,或尝试使用以下指令在新版本 Node.js 下启动项目:

NODE_OPTIONS="--openssl-legacy-provider" yarn start

sudo yarn start

另外项目启动应该不需要 sudo

from tango.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.