Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jiehuanxiang opened this issue Jun 29, 2022 · 3 comments
Open

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

jiehuanxiang opened this issue Jun 29, 2022 · 3 comments

Comments

@jiehuanxiang
Copy link

jiehuanxiang commented Jun 29, 2022

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
Copy link

upgrade your node version to 15+

@jiehuanxiang
Copy link
Author

"upgrade your node version to 15+" solved my problem,thx。
i use [email protected],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
Copy link

it dose not matter, ignore the warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants