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

Can't find "easings.min.js.map" file #344

Open
RexHung0302 opened this issue Jul 28, 2022 · 15 comments
Open

Can't find "easings.min.js.map" file #344

RexHung0302 opened this issue Jul 28, 2022 · 15 comments
Labels

Comments

@RexHung0302
Copy link

RexHung0302 commented Jul 28, 2022

Description

I try to run the code but Terminal give me the warning, how to fix it?
It seem an error on plugins, not my code.

Link to isolated reproduction with no external CSS / JS

I don't have the link for demo, but I got the warning screenshoot
image

Steps to reproduce it

  1. yarn
  2. yarn start
  3. "@fullpage/react-fullpage" is warning

Versions

"@fullpage/react-fullpage": "^0.1.26",
"react": "^18.2.0",

@alvarotrigo
Copy link
Owner

alvarotrigo commented Jul 28, 2022

That's weird.
Make sure the map file (easings.min.js.map) is on your node_modules/fullpage.js/vendors/ folder, like in this pic:

image

@alvarotrigo
Copy link
Owner

Map files are automatically loaded by the browser dev tools. So it shouldn't even be a compile warning or error.

The source map file will only be downloaded if you have source maps enabled and your dev tools open. You'll also need to upload your original files so the dev tools can reference and display them when necessary.

Source

@alvarotrigo
Copy link
Owner

I've made made a commit to prevent the loading of the file if you are using css3: true, I'll merge it on the next release.
(Although this is not directly related with your issue)

@RexHung0302
Copy link
Author

RexHung0302 commented Aug 3, 2022

Sorry for the delay in getting back to you, I has the file on my node_modules/fullpage.js/vendors/ folder, but still got the warning.
截圖 2022-08-03 下午4 50 07

And I got the new waring like this
image

not found /node_modules/@fullpage/react-fullpage/dist/scrolloverflow.min.js.map

@alvarotrigo
Copy link
Owner

Can you provide an isolated reproduction in Codesandbox with no CSS or JS files external to fullPage.js and the minimum amount of HTML code. Use empty sections unless strictly necessary for the reproduction?

@RexHung0302
Copy link
Author

Okay, here is a demo link in Codesandbox, but it so weird, I use the version 0.1.22 same as my project, but here is no warning.
P.S: I remove the licenseKey in demo, but I actually use it in my project, can ignore licenseKey error.

@alvarotrigo
Copy link
Owner

@RexHung0302 your demo is not working
image

@RexHung0302
Copy link
Author

Sorry, I fixed it, I forgot to save it. Codesandbox

@alvarotrigo
Copy link
Owner

Make sure to update to the latest version of the fullpage-react wrapper version 0.1.26

@alvarotrigo alvarotrigo mentioned this issue Aug 7, 2022
Merged
@stuart-garner
Copy link

I am getting the same issue. Started using react-fullpage yesterday and its version 0.1.26.

Same error as above and no files found in the dist folder.
Screenshot 2022-08-07 at 21 18 41

@alvarotrigo
Copy link
Owner

Mind updating your codesandbox with such version to reproduce the issue?

@stuart-garner
Copy link

Updated version to 0.1.27.

Build completes successfully bit error regarding missing file persists
Screenshot 2022-08-07 at 22 54 01

@alvarotrigo
Copy link
Owner

The codesandbox doesn't show any warning and I can't reproduce it on the examples that come with the component.

@alvarotrigo
Copy link
Owner

alvarotrigo commented Aug 7, 2022

The .map file is inside the vendors folder where the easings.min.js file is.
More specifically on node_modules/fullpage.js/vendors/easings.min.js.map.

In any case, this is a warning, not an error, so I wouldn't bother too much.
The map file is not really necessary for anything except for debugging in the browser tools for developers.

@alvarotrigo
Copy link
Owner

alvarotrigo commented Aug 7, 2022

I think the problem here is that the easings.min.js file contains the path for the map file on its very bottom:

//# sourceMappingURL=scrolloverflow.min.js.map

This works ok when using vanilla fullPage.js, as people usually don't move files around.

But when creating the fullPage.js bundle, the easings.min.js gets bundled together with the react code on the dist folder (or whatever folder you choose for your bundle) and now the map file isn't there.

I'm not a webpack expert.
But the solution is probably:

  • Copy the .map file into thee dist folder where the bundle is.
  • Or change the path of the .map file the easings.min.js file

Probably doable with plugins like the one suggested in this solution:
https://stackoverflow.com/questions/33795044/webpack-use-existing-source-map-from-previous-build-step

Or this:
https://stackoverflow.com/questions/27639005/how-to-copy-static-files-to-build-directory-with-webpack

Feel free to do a pull request if you find the way :)
And if you are aware of any better approach I'm all ears!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants