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

Node module warnings #273

Closed
5 tasks done
pbower opened this issue Dec 18, 2023 · 7 comments
Closed
5 tasks done

Node module warnings #273

pbower opened this issue Dec 18, 2023 · 7 comments

Comments

@pbower
Copy link

pbower commented Dec 18, 2023

Describe the bug

Hi there,

Merry Christmas - trust you're looking forward to the holiday season.

Sharing back node warnings, that look like they relate to JS files referencing non-existent src locations.

It's possible this is a setup thing, but I've grabbed the latest versions from npm and experiencing the (389) warnings, so I thought I'd feed it back.

It occurs with npm run react-star, and I am using one non-interesting SlickgridReact instance.

If any further details are required please let me know.

Thanks!

image

WARNING in ./node_modules/slickgrid-react/dist/esm/services/translater.service.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/slickgrid-react/src/slickgrid-react/services/translater.service.ts' file: Error: ENOENT: no such file or directory, open '.../client/node_modules/slickgrid-react/src/slickgrid-react/services/translater.service.ts'

WARNING in ./node_modules/slickgrid-react/dist/esm/services/utilities.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/slickgrid-react/src/slickgrid-react/services/utilities.ts' file: Error: ENOENT: no such file or directory, open '.../node_modules/slickgrid-react/src/slickgrid-react/services/utilities.ts'

WARNING in ./node_modules/slickgrid-react/dist/esm/slickgrid-config.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/slickgrid-react/src/slickgrid-react/slickgrid-config.ts' file: Error: ENOENT: no such file or directory, open '.../node_modules/slickgrid-react/src/slickgrid-react/slickgrid-config.ts'

Reproduction

[email protected]
── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]
├── @slickgrid-universal/[email protected]

Expectation

No warnings.

Environment Info

Typescript
VsCode
├── [email protected]

  System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900KF
    Memory: 26.23 GB / 31.24 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.5.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 10.2.0 - /usr/bin/npm
  npmPackages:
    slickgrid-react: ^4.0.2 => 4.0.2

Validations

@ghiscoding
Copy link
Owner

ghiscoding commented Dec 18, 2023

It really looks like it wants me to include the source files and this is the second time you talk about source files, it might be needed by the source map maybe. It looks like I should really include the src folder for the source maps to work, I'll do that in a future PR. I've never seen these warnings on my side though, you must have different warning level than me, and I assume you only get them while running Dev not while running a Production build since that would only be useful for development usage

@pbower
Copy link
Author

pbower commented Dec 18, 2023

Thanks for your response.
Ok that's interesting.
Re. the source files, that was likely more my inexperience than a standard pattern. In this case, are there some loose references in the JS?

@ghiscoding
Copy link
Owner

Well I mean it's showing in your warnings that you posted and then I looked at my project source maps in the dist folder and indeed it is pointing to src and I can troubleshoot locally and add breakpoints but the fact is that I always excluded the src folder from npm publish so...

here's 1 of your warning, I highlighted the src (though it might be hard to see below)

WARNING in ./node_modules/slickgrid-react/dist/esm/services/translater.service.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/slickgrid-react/src/slickgrid-react/services/translater.service.ts' file: Error: ENOENT: no such file or directory, open '.../client/node_modules/slickgrid-react/src/slickgrid-react/services/translater.service.ts'

then if you use the unpkg website which is very helpful to see what is published, you can see exactly which files and folders are part of the npm package and src was never included, e.g.
https://unpkg.com/browse/@slickgrid-universal/[email protected]/

I already made a PR for Slickgrid-Universal to add the src folder, I have to do the same in this repo here as well

@pbower
Copy link
Author

pbower commented Dec 18, 2023

Thanks, ok sounds great.

@ghiscoding
Copy link
Owner

ghiscoding commented Dec 18, 2023

The PRs in both repos should fix the issue but I won't publish until a couple more days, I'll post back here when it's available.

For a side note, if you're interested, you can see when gets published on npm by running npm pack (I added an npm script myself), it will create a .tgz file that you can open and see what will end up on npm and that's how I worked on these PRs, I needed a couple of trials to see what options where the best to use without publishing yet

@ghiscoding
Copy link
Owner

This should be fixed now with latest v4.1.0, the src is now included for Slickgrid-React and all Slickgrid-Universal packages

@pbower
Copy link
Author

pbower commented Dec 21, 2023

Awesome.

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