0.2.26 brakes browser builds (by node-only PlatformTools refactoring commit)
See original GitHub issueIssue type: [x] bug report
Database system/driver: all / browser-builds
TypeORM version:
[x] 0.2.26
Steps to reproduce or a small repository showing the problem: Building a project with TypeORM 0.2.26 with webpack for a browser target leads to multiple errors, the following is just just an excerpt (with duplicates removed):
WARNING in ../node_modules/typeorm/browser/connection/ConnectionOptionsReader.js 114:45-64
Critical dependency: the request of a dependency is an expression
WARNING in ../node_modules/typeorm/browser/util/DirectoryExportedClassesLoader.js 38:38-78
Critical dependency: the request of a dependency is an expression
Module not found: Error: Can't resolve 'path'
Module not found: Error: Can't resolve 'stream'
Module not found: Error: Can't resolve 'fs'
Module not found: Error: Can't resolve 'timers'
I could track this down to this commit: https://github.com/typeorm/typeorm/commit/490ad0d424e674de5be38b0c3bc83b9a14a383a5
I reverted this commit locally and could then successfully use 0.2.26 with this modification in a browser Webpack build.
I guess that https://github.com/typeorm/typeorm/pull/6630 didn’t take browser builds into account for its refactoring. On a quick look those errors (and the code changes in the pull request) do look like node-only stuff.
I suggest reverting the commit/PR @pleerock.
Issue Analytics
- State:
- Created 3 years ago
- Comments:26 (24 by maintainers)
Top GitHub Comments
thanks @imnotjames - https://github.com/typeorm/typeorm/pull/6763 seems to do it. no more warnings/errors.
Thanks @imnotjames @chriswep . I’ll release a new version in a few days.