dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

nocodb: ts-loader failing dependency

Open happysalada opened this issue 3 years ago • 1 comments

trying to build nocodb, I get this at the end of the build (after all the overrides).

Hash: 88d3eb52fb7243dc0e86
Version: webpack 4.46.0
Time: 1375ms
Built at: 04/23/2022 11:52:54 PM
 1 asset
Entrypoint main = bundle.js
[0] ./src/lib/noco/Noco.ts 349 bytes {0} [built] [failed] [1 error]
[1] ./src/lib/noco/nc.try.ts 375 bytes {0} [built] [failed] [1 error]
[2] ./src/lib/utils/NcConfigFactory.ts 380 bytes {0} [built] [failed] [1 error]
[3] ./src/lib/index.ts 1.04 KiB {0} [built]

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' opti>
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configu>

ERROR in ./src/lib/utils/NcConfigFactory.ts 36:29
Module parse failed: Unexpected token (36:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to proce>
| };

it looks like something isn't finding properly ts-loader. Not sure I have to say. I'm posting it here in case you've seen something similar. I think we ran into this once.

happysalada avatar Apr 24 '22 03:04 happysalada

Yes, I have seen these errors many times. The bundler's (in this case webpack's) module resolver doesn't find the right loader library. There are several things you can do:

  1. check the dream-lock.json file and make sure that the missing library is actually a dependency of the package which is bundled
  2. In case it is not, try using inject
  3. Try overriding installMethod = "copy" which potentially reduces symlink related issues during module installation
  4. pray to the god of nix
  5. open an issue with your non-working flake attached

DavHau avatar Apr 24 '22 08:04 DavHau

I tried, but I'm unable to reproduce the issue. Either upstream, or dream2nix changed. Also this is likely fixed by https://github.com/nix-community/dream2nix/pull/337, therefore closing.

If the problem persists please re-open and provide exact revision of the project triggering the problem.

DavHau avatar Oct 26 '22 13:10 DavHau