thingsboard / thingsboard-rule-config-ui-ngx

31 stars 52 forks source link

line.trim(...).split(...)[0].replaceAll is not a function #80

Open jiehuanxiang opened 2 years ago

jiehuanxiang commented 2 years ago

when i run build, there's an error: line.trim(...).split(...)[0].replaceAll ` ➜ thingsboard-rule-config-ui-ngx git:(master) ✗ yarn build yarn run v1.22.10 warning ../../../package.json: No license field $ ng build && node install.js Building Angular Package


Building entry point 'rulenode-core-config'

✔ Compiling with Angular sources in Ivy partial compilation mode. ✖ Bundling to SystemJS line.trim(...).split(...)[0].replaceAll is not a function error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. i can find this: modulesStr.split(',' + os.EOL).forEach( (line) => { const moduleId = line.trim().split(":")[0].replaceAll("'", "").trim(); if (moduleId.length) { externalModuleIds.push(moduleId); } } ); the codes are in patches/ng-packagr+12.2.7.patch, i can't find anyother places where the codes in. Angular CLI: 12.2.15 Node: 14.19.3 Package Manager: yarn 1.22.10 OS: darwin x64 Angular: 12.2.15 ` thx

klonhj2015 commented 2 years ago

upgrade your node version to 15+

jiehuanxiang commented 2 years ago

"upgrade your node version to 15+" solved my problem,thx。 i use node@16.15.1,there's the warning, but the project is working, i build the result js file at the end. ➜ thingsboard-rule-config-ui-ngx git:(master) ✗ yarn start yarn run v1.22.10 warning ../../../package.json: No license field $ node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve Building Angular Package **(node:8093) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead** (Usenode --trace-deprecation ...to show where the warning was created)

klonhj2015 commented 2 years ago

it dose not matter, ignore the warning