Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning for missing source map files #366

Closed
der-cain opened this issue Jul 14, 2021 · 6 comments
Closed

Warning for missing source map files #366

der-cain opened this issue Jul 14, 2021 · 6 comments
Milestone

Comments

@der-cain
Copy link

der-cain commented Jul 14, 2021

Hello,

I'm getting warning when I run npm start like this

 warning  in ./node_modules/@stomp/stompjs/esm6/client.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find source file '../src/client.ts': Error: Can't resolve '../src/client.ts' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

 @ ./node_modules/@stomp/stompjs/esm6/index.js 1:0-25 1:0-25
 @ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
 @ ./src/main/webapp/app/shared/stomp/index.js
 @ ./src/main/webapp/app/app.tsx
 @ ./src/main/webapp/app/gateway.tsx
 @ ./src/main/webapp/app/index.tsx
 @ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

When I look into the source map files I see references to folder ../src/client.ts as mentioned in the warning but they don't seem to be part of the npm distribution. In my node_modules I have only the folders bundles and esm6, the src folder which I see part of the github source seems not to be included when I install stompjs using npm install.

Is there a way to get also the source files included or to remove them from the source map files (i.e. client.js.map)?

Thanks!

@kum-deepak
Copy link
Member

Many thanks for pointing it out. It does not make sense to include the sourcemap when the source is not included.

In the next release, the source maps will be removed from the npm package. I think that should resolve the issue.

A note to myself, it needs to be done for rx-stomp and ng2-stompjs as well.

@kum-deepak
Copy link
Member

Please try the newly released 6.1.1, it should resolve the issue.

@der-cain
Copy link
Author

der-cain commented Sep 2, 2021

I have tried it and now I get a similar but different message:

` WARNING Compiled with 15 warnings 08:28:36

warning in ./node_modules/@stomp/stompjs/esm6/augment-websocket.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'augment-websocket.js.map': Error: Can't resolve './augment-websocket.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/stomp-handler.js 6:0-55 207:12-28
@ ./node_modules/@stomp/stompjs/esm6/client.js
@ ./node_modules/@stomp/stompjs/esm6/index.js
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/byte.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'byte.js.map': Error: Can't resolve './byte.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/stomp-handler.js 1:0-30 165:41-45
@ ./node_modules/@stomp/stompjs/esm6/client.js
@ ./node_modules/@stomp/stompjs/esm6/index.js
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/client.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'client.js.map': Error: Can't resolve './client.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 1:0-25 1:0-25
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'compat-client.js.map': Error: Can't resolve './compat-client.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6/compatibility'

@ ./node_modules/@stomp/stompjs/esm6/index.js 10:0-46 10:0-46
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/frame-impl.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'frame-impl.js.map': Error: Can't resolve './frame-impl.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 2:0-29 2:0-29
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'heartbeat-info.js.map': Error: Can't resolve './heartbeat-info.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6/compatibility'

@ ./node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js 2:0-49 27:34-47
@ ./node_modules/@stomp/stompjs/esm6/index.js
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/index.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'index.js.map': Error: Can't resolve './index.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx 4:0-40 19:28-34
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/parser.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'parser.js.map': Error: Can't resolve './parser.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 3:0-25 3:0-25
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/stomp-config.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-config.js.map': Error: Can't resolve './stomp-config.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 4:0-31 4:0-31
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/stomp-handler.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-handler.js.map': Error: Can't resolve './stomp-handler.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/client.js 10:0-47 212:37-49
@ ./node_modules/@stomp/stompjs/esm6/index.js
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/stomp-headers.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-headers.js.map': Error: Can't resolve './stomp-headers.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 5:0-32 5:0-32
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/stomp-subscription.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-subscription.js.map': Error: Can't resolve './stomp-subscription.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 6:0-37 6:0-37
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/compatibility/stomp.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp.js.map': Error: Can't resolve './stomp.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6/compatibility'

@ ./node_modules/@stomp/stompjs/esm6/index.js 11:0-38 11:0-38
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/types.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'types.js.map': Error: Can't resolve './types.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/client.js 11:0-61 95:21-36 150:30-45 171:27-42 179:26-41 246:39-54 250:42-57 306:31-46 307:38-53 310:30-45 316:46-62 324:34-49
@ ./node_modules/@stomp/stompjs/esm6/index.js
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

warning in ./node_modules/@stomp/stompjs/esm6/versions.js

Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'versions.js.map': Error: Can't resolve './versions.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

@ ./node_modules/@stomp/stompjs/esm6/index.js 8:0-27 8:0-27
@ ./src/main/webapp/app/shared/stomp/components/StompSessionProvider.tsx
@ ./src/main/webapp/app/shared/stomp/index.ts
@ ./src/main/webapp/app/app.tsx
@ ./src/main/webapp/app/gateway.tsx
@ ./src/main/webapp/app/index.tsx
@ multi (webpack)-dev-server/client?http://localhost:9060 (webpack)/hot/dev-server.js ./src/main/webapp/app/index

⚠ 「wdm」: 1609 modules

WARNING in ./node_modules/@stomp/stompjs/esm6/augment-websocket.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'augment-websocket.js.map': Error: Can't resolve './augment-websocket.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/byte.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'byte.js.map': Error: Can't resolve './byte.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/client.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'client.js.map': Error: Can't resolve './client.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'compat-client.js.map': Error: Can't resolve './compat-client.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6/compatibility'

WARNING in ./node_modules/@stomp/stompjs/esm6/frame-impl.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'frame-impl.js.map': Error: Can't resolve './frame-impl.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'heartbeat-info.js.map': Error: Can't resolve './heartbeat-info.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6/compatibility'

WARNING in ./node_modules/@stomp/stompjs/esm6/index.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'index.js.map': Error: Can't resolve './index.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/parser.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'parser.js.map': Error: Can't resolve './parser.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/stomp-config.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-config.js.map': Error: Can't resolve './stomp-config.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/stomp-handler.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-handler.js.map': Error: Can't resolve './stomp-handler.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/stomp-headers.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-headers.js.map': Error: Can't resolve './stomp-headers.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/stomp-subscription.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp-subscription.js.map': Error: Can't resolve './stomp-subscription.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/compatibility/stomp.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'stomp.js.map': Error: Can't resolve './stomp.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6/compatibility'

WARNING in ./node_modules/@stomp/stompjs/esm6/types.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'types.js.map': Error: Can't resolve './types.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'

WARNING in ./node_modules/@stomp/stompjs/esm6/versions.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find SourceMap 'versions.js.map': Error: Can't resolve './versions.js.map' in '/Users/marius/Source/fino-react/node_modules/@stomp/stompjs/esm6'
ℹ 「wdm」: Compiled with warnings.
`

Now it's complaining that the SourceMap file is not found.

@kum-deepak kum-deepak reopened this Sep 2, 2021
@kum-deepak
Copy link
Member

Thanks for pointing it out, I am reopening this issue.

@kum-deepak
Copy link
Member

I have pushed v6.1.2 - this version includes both source-maps and sources. Please check if it resolves the issue.

@kum-deepak
Copy link
Member

In v7, the following changes will happen:

  • The minified version will not have a source map associated.
  • The minified version will be the default entry point.

@kum-deepak kum-deepak added this to the v7 milestone Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants