天天看點

解決 Angular 官網下載下傳的庫 Schematics 在 windows 環境不支援 .. 的臨時解決方案

[email protected] build c:\Code\SPA\schematics-for-libraries\projects\my-lib

…/…/node_modules/.bin/tsc -p tsconfig.schematics.json

‘…’ is not recognized as an internal or external command,

operable program or batch file.

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] build: ../../node_modules/.bin/tsc -p tsconfig.schematics.jsonnpm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] build script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\I042416\AppData\Roaming\npm-cache_logs\2021-10-18T07_11_32_366Z-debug.log

問題的根源出現在 package.json 這一行:

“build”: “…/…/node_modules/.bin/tsc -p tsconfig.schematics.json”,

解決 Angular 官網下載下傳的庫 Schematics 在 windows 環境不支援 .. 的臨時解決方案
解決 Angular 官網下載下傳的庫 Schematics 在 windows 環境不支援 .. 的臨時解決方案
解決 Angular 官網下載下傳的庫 Schematics 在 windows 環境不支援 .. 的臨時解決方案

繼續閱讀