This repository was archived by the owner on Dec 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 178
This repository was archived by the owner on Dec 1, 2019. It is now read-only.
incompatibility with pnpm #641
Copy link
Copy link
Open
Description
pnpm is an alternative to npm that does not adhere to a flat node_modules structure. It instead organizes dependencies as a tree, only allowing files to require modules it explicitly depends on. This seems to cause an issue with awesome-typescript-loader. It fails to find the expected modules when looking at type declaration files. If I install the dependencies via npm, it succeeds. If I remove awesome-typescript-loader and build with webpack, treating the inputs as regular js, it succeeds.
I have created a repro repo https://github.com/andykais/pnpm-awesome-typescript-loader-error-repro/commit/1bebc0b662d1075d4f4a365ee78fed45b8f581df/checks#step:5:87
> [email protected] build /home/runner/work/pnpm-awesome-typescript-loader-error-repro/pnpm-awesome-typescript-loader-error-repro
> webpack --mode=development
ℹ 「atl」: Using [email protected] from typescript
ℹ 「atl」: Using tsconfig.json from /home/runner/work/pnpm-awesome-typescript-loader-error-repro/pnpm-awesome-typescript-loader-error-repro/tsconfig.json
ℹ 「atl」: Checking started in a separate process...
✖ 「atl」: Checking finished with 6 errors
Hash: 83b60abbe2762d3916d5
Version: webpack 4.39.2
Time: 4887ms
Built at: 2019-08-21 15:04:02
Asset Size Chunks Chunk Names
bundle.js 1.16 MiB main [emitted] main
bundle.js.map 1.3 MiB main [emitted] main
Entrypoint main = bundle.js bundle.js.map
[./node_modules/.registry.npmjs.org/webpack/[email protected]/node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {main} [built]
[./node_modules/.registry.npmjs.org/webpack/[email protected]/node_modules/webpack/buildin/harmony-module.js] (webpack)/buildin/harmony-module.js 573 bytes {main} [built]
[./src/index.ts] 121 bytes {main} [built]
+ 46 hidden modules
ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:28:22
TS2307: Cannot find module 'csstype'.
ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:29:28
TS2307: Cannot find module 'prop-types'.
ERROR in [at-loader] ./node_modules/redux/index.d.ts:149:11
TS2339: Property 'observable' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/redux/index.d.ts:247:11
TS2339: Property 'observable' does not exist on type 'SymbolConstructor'.
ERROR in [at-loader] ./node_modules/redux/index.d.ts:1:23
TS2688: Cannot find type definition file for 'symbol-observable'.
ERROR in [at-loader] ./node_modules/@types/react-redux/index.d.ts:42:39
TS2307: Cannot find module 'hoist-non-react-statics'.
ERROR Command failed with exit code 2.
##[error]Process completed with exit code 1.
alanpearce and KaboomFox
Metadata
Metadata
Assignees
Labels
No labels