问题标签 [post-install]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
node.js - `tsc` 在安装后挂钩中不起作用
我正在尝试通过postinstall
钩子构建打字稿共享包:
注意:我被限制使用节点 v12.x。我正在测试的版本是12.18.3
我的共享包脚本:
对于构建脚本,我也尝试过npx -p typescript tsc
,但它tsc --help
改为运行:
在主包中我像这样导入它:
但我得到这个错误:
tsc -b
错误 TS5083:无法读取文件“/Users/test/api.backend.js/node_modules/shared-services/tsconfig.json”。