[GH-ISSUE #64] Published npm version should contain src folder #37

Closed
opened 2026-03-03 00:02:54 +03:00 by kerem · 2 comments
Owner

Originally created by @EugeneSnikhovskiy on GitHub (Feb 18, 2022).
Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/64

Hello. First of all thanks for great tool!

I updated my app to webpack 5 and it got smarter :)

For now I receive warnings that webpack can't find source maps for gql-query-builder

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/NestedField.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/NestedField.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/OperationType.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/OperationType.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/Utils.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/Utils.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncMutationAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncMutationAdapter.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncQueryAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncQueryAdapter.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultMutationAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultMutationAdapter.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultQueryAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultQueryAdapter.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultSubscriptionAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultSubscriptionAdapter.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/index.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/index.ts'

Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/index.ts'

And, for example node_modules/gql_query_builder/build/Fields.js.map has this code

{"version":3,"file":"Fields.js","sourceRoot":"","sources":["../src/Fields.ts"],"names":[],"mappings":""}

"sources":["../src/Fields.ts"] points to a non-existent file

Originally created by @EugeneSnikhovskiy on GitHub (Feb 18, 2022). Original GitHub issue: https://github.com/atulmy/gql-query-builder/issues/64 Hello. First of all thanks for great tool! I updated my app to webpack 5 and it got smarter :) For now I receive warnings that webpack can't find source maps for gql-query-builder ```bash Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/NestedField.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/NestedField.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/OperationType.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/OperationType.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/Utils.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/Utils.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncMutationAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncMutationAdapter.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncQueryAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultAppSyncQueryAdapter.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultMutationAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultMutationAdapter.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultQueryAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultQueryAdapter.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultSubscriptionAdapter.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/DefaultSubscriptionAdapter.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/index.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/adapters/index.ts' Failed to parse source map from '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/eugene/projects/front-tm2/node_modules/gql-query-builder/src/index.ts' ``` And, for example `node_modules/gql_query_builder/build/Fields.js.map` has this code ```json {"version":3,"file":"Fields.js","sourceRoot":"","sources":["../src/Fields.ts"],"names":[],"mappings":""} ``` `"sources":["../src/Fields.ts"]` points to a non-existent file
kerem 2026-03-03 00:02:54 +03:00
Author
Owner

@EugeneSnikhovskiy commented on GitHub (Feb 18, 2022):

I see help wanted label.
I don't know how you publish new versions, but I can assume that with npm publish command,
and probably you have .npmignore file in project root folder.
If yes - you need to remove or comment src line in .npmignore

<!-- gh-comment-id:1044694527 --> @EugeneSnikhovskiy commented on GitHub (Feb 18, 2022): I see `help wanted` label. I don't know how you publish new versions, but I can assume that with `npm publish` command, and probably you have `.npmignore` file in project root folder. If yes - you need to remove or comment `src` line in `.npmignore`
Author
Owner

@atulmy commented on GitHub (Jul 2, 2022):

Fixed by #69

<!-- gh-comment-id:1172847994 --> @atulmy commented on GitHub (Jul 2, 2022): Fixed by #69
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gql-query-builder#37
No description provided.