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

ENOENT Error #43

Closed
cujarrett opened this issue Dec 26, 2021 · 5 comments · Fixed by #44
Closed

ENOENT Error #43

cujarrett opened this issue Dec 26, 2021 · 5 comments · Fixed by #44

Comments

@cujarrett
Copy link

What

Forgive me if I'm wrong but I am using this package in a create-react-app 5.0.0 and React 17.X.X setting and with simplex-noise 3.0.0 I recieve this error.

WARNING in ./node_modules/simplex-noise/dist/esm/simplex-noise.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/matt-jarrett/Developer/js-pollock/node_modules/simplex-noise/simplex-noise.ts' file: Error: ENOENT: no such file or directory, open '/Users/matt-jarrett/Developer/js-pollock/node_modules/simplex-noise/simplex-noise.ts'
 @ ./src/lib/create-renderer.js 6:0-41 15:22-34
 @ ./src/lib/index.js 8:0-50 28:25-39
 @ ./src/App.js 13:0-25 87:39-42
 @ ./src/index.js 8:0-27 11:38-41

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.65.0 compiled with 1 warning in 1864 ms

My use

import SimplexNoise from "simplex-noise"
...
export default (opt = {}) => {
  ...
  const simplex = new SimplexNoise(randFunc)
  ...
}

Am I doing something wrong?

I searched for simplex-noise.ts as it's referenced in the error and I see it in this package's package.json.

...
"source": "simplex-noise.ts",
...
@jwagner
Copy link
Owner

jwagner commented Dec 30, 2021

Interesting. The source property does not seem to have an official definition: https://docs.npmjs.com/cli/v8/configuring-npm/package-json

I think I've used it in the context of parceljs: https://parceljs.org/features/targets/#package.json%23source

Do you know what interpretation create-react-app (or I guess more specifically webpack?) has of that property? I can't find a reference to it in their documentation.

Judging from the tests it's safe to remove. Did you try if removing this attribute solves your problem?

@cujarrett
Copy link
Author

Thanks for the feedback @jwagner , I appriciate it.

I can try to remove it locally and report back.

@cujarrett
Copy link
Author

Same error, it renders the app but I am happy to help figure out what's going on if you have any ideas.

WARNING in ./node_modules/simplex-noise/dist/esm/simplex-noise.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/matt-jarrett/Developer/js-pollock/node_modules/simplex-noise/simplex-noise.ts' file: Error: ENOENT: no such file or directory, open '/Users/matt-jarrett/Developer/js-pollock/node_modules/simplex-noise/simplex-noise.ts'
 @ ./src/lib/create-renderer.js 6:0-41 15:22-34
 @ ./src/lib/index.js 8:0-50 28:25-39
 @ ./src/App.js 13:0-25 87:39-42
 @ ./src/index.js 8:0-27 11:38-41

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.65.0 compiled with 1 warning in 5381 ms

jwagner added a commit that referenced this issue Jan 4, 2022
jwagner added a commit that referenced this issue Jan 4, 2022
@jwagner
Copy link
Owner

jwagner commented Jan 4, 2022

@cujarrett I found the issue now. The fix is out in 3.0.1. Can you confirm that fixes it for you as well? :)

@cujarrett
Copy link
Author

3.0.1 fixed it, thanks @jwagner 👍

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

Successfully merging a pull request may close this issue.

2 participants