typeorm: no such file or directory highlight.js/tools/build.js when installing typeorm
Issue type:
[ ] question [x] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
I tried to install typeorm in a clean new directory (no other dependencies except typeorm) and I got this error:
ENOENT: no such file or directory, chmod '/Users/user/dev/nestjs-custom-base-entity/node_modules/highlight.js/tools/build.js'
Also happens when I tried to install typeorm globally with sudo. tried to clean npm cache couple of time.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 27
- Comments: 15 (3 by maintainers)
Works for me when I run
npm i typeorm --no-bin-linksLooks like this is a bug from highlight.js latest version https://github.com/highlightjs/highlight.js/issues/1984
My solution:
npm i highlight.js@9.14.2 -D. They have solved this problem,waiting for the new version.Oh my freaking god!!
https://github.com/typeorm/typeorm/blob/master/src/commands/SchemaLogCommand.ts#L60 https://github.com/typeorm/typeorm/blob/master/src/platform/PlatformTools.ts#L3 https://github.com/typeorm/typeorm/blob/master/src/commands/SchemaLogCommand.ts#L4
It is insane for highlighting and console log typeorm is broken 😄 It is strange also that CLI is not separated from the main build 😉
Try use
yarnIt’s solved for meCan you please use provided solution for now?
npm i highlight.js@9.14.2 -DWe just need to wait when highlight.js fix their issue, its a critical issue, I’m sure they will fix it very soon.
Seems that typeorm depends on cli-highlight which itself depends on highlight.js 9.6.0
Typeorm package.json dependencies :
cli-highlight package.json dependencies :
How would this workaround work on a deployment server’s npm install?
Got the same issue. Thanks for the quickfix @yogevlahyani