规则引擎构建笔记

这里写自定义目录标题

前端

安装yarn

https://www.lsbin.com/wp-content/themes/begin%20lts/inc/go.php?url=https://github.com/yarnpkg/yarn/releases/download/v1.22.4/yarn-1.22.4.msi

npx create-react-app antd-demo-ts --template typescript

1、cmd查看当前node版本和node安装位置

node -v
where node
2、百度搜索“node+需要版本”管网下载LTS版本的nodejs。安装到之前的目录即可
node 下载地址https://nodejs.org/zh-cn/download/releases/

d:\Program Files\nodejs

D:\Program Files\nodejs>yarn create react-app antd-demo-ts --template typescript

cd antd-demo-ts
  yarn start

Module.createRequire is not a function
assets by path static/ 1.49 MiB
  asset static/js/bundle.js 1.48 MiB [emitted] (name: main) 1 related asset
  asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.93 KiB [emitted] 1 related asset
  asset static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg 2.57 KiB [emitted] (auxiliary name: main)
asset index.html 579 bytes [emitted]
asset asset-manifest.json 546 bytes [emitted]
runtime modules 31.3 KiB 15 modules
modules by path ./node_modules/ 1.35 MiB 99 modules
modules by path ./src/ 18.1 KiB
  modules by path ./src/*.css 8.82 KiB
    ./src/index.css 2.72 KiB [built] [code generated]
    ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css 1.37 KiB [built] [code generated]
    ./src/App.css 2.72 KiB [built] [code generated]
    ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/App.css 2 KiB [built] [code generated]
  modules by path ./src/*.tsx 4.33 KiB
    ./src/index.tsx 1.8 KiB [built] [code generated]
    ./src/App.tsx 2.53 KiB [built] [code generated]
  ./src/reportWebVitals.ts 1.39 KiB [built] [code generated]
  ./src/logo.svg 3.61 KiB [built] [code generated]

ERROR in Module.createRequire is not a function

ERROR in   Error: Child compilation failed:
  Module.createRequire is not a function

  - child-compiler.js:169 childCompiler.runAsChild
    [antd-demo-ts]/[html-webpack-plugin]/lib/child-compiler.js:169:18

  - Compiler.js:564 compile
    [antd-demo-ts]/[webpack]/lib/Compiler.js:564:11

  - Compiler.js:1183 hooks.afterCompile.callAsync.err
    [antd-demo-ts]/[webpack]/lib/Compiler.js:1183:17


  - next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7



1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack 5.70.0 compiled with 3 errors in 134058 ms
No issues found.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值