Skip to content

Update package.json #1

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

Merged
merged 3 commits into from
May 19, 2022
Merged

Update package.json #1

merged 3 commits into from
May 19, 2022

Conversation

frankkienl
Copy link
Contributor

@frankkienl frankkienl commented May 4, 2022

Fixes #5:

node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module '/Users/frankbouwens/priv/SOME_PROJECT/node_modules/@2toad/diff-match-patch/diff_match_patch.js'. Please verify that the package.json has a valid "main" entry

Possible fix for:
```
node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module '/Users/frankbouwens/priv/SOME_PROJECT/node_modules/@2toad/diff-match-patch/diff_match_patch.js'. Please verify that the package.json has a valid "main" entry
```
@JasonPierce
Copy link
Contributor

JasonPierce commented May 4, 2022

Thanks for the PR Frank. Will you please send me the Node and NPM versions you are using so I can reproduce and test this?

@frankkienl
Copy link
Contributor Author

Hi Jason,

Here are my node and npm versions:

node: v16.14.2 
npm: 8.5.0

I noticed that the file:
https://github.com/2Toad/diff-match-patch/blob/400fc9962afa78df9d55a12b1ba1e2df31f3cf80/diff-match-patch.js
is named "diff-match-patch.js" with -'s
and the file:

"main": "diff_match_patch.js",

mentions that same file, but with _ instead of -.
When I changed the package.json file as in this PR, the error disappeared.

Hope this helps!

@JasonPierce
Copy link
Contributor

Thanks Frank!

Will you pleas merge latest master into your branch? I've replaced the defunct Travis CI build script with new GitHub Actions, which will test your changes against the supported Node versions

@frankkienl
Copy link
Contributor Author

Fetched changes from upstream. Master should be merged now ;-) !

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 this pull request may close these issues.

Error: Cannot find module @2toad/diff-match-patch/diff_match_patch.js
2 participants