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

A little bit of maintenance on the ReasonML examples #11662

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/with-reasonml-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"devDependencies": {
"@babel/core": "^7.4.3",
"bs-platform": "5.0.3",
"babel-types": "6.26.0",
Copy link
Member

@timneutkens timneutkens Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this one needed? babel-types is the Babel 6 version of it's types 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.dropbox.com/s/49en6itmq3nwmiw/Screenshot%202020-04-05%2014.20.25.png?dl=0

Seems that it has to do with the Bucklescript babel plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following occurs when I remove the babel-plugin-bucklescript from the package.json file.

[ error ] ./node_modules/next/dist/client/next-dev.js                                                                                                     │
Error: Cannot find module 'babel-plugin-bucklescript' from '/Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo'                           │
    at Array.map (<anonymous>)                                                                                                                            │
Error: Cannot find module '/Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo/.next/server/static/development/pages/_document'            │
Require stack:                                                                                                                                            │
- /Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo/node_modules/next/dist/next-server/server/load-components.js  

I don't know enough about the next.js dev server to understand why it's trying to load the plugin. I've used ripgrep to search the entire node_modules folder and can't find any reference to the plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mike-engel/babel-plugin-bucklescript#7

Seems that the babel-plugin-bucklescript has been archived and that it's got an implicit dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that I'm not very smart. I didn't realize that the babel-plugin-bucklescript dependency was coming from the .babelrc file 🤦‍♂ . I removed that dependency and the associated babel-types dependency and now all is well.

"bs-platform": "7.2.2",
"concurrently": "^4.1.0"
}
}
1 change: 1 addition & 0 deletions examples/with-reasonml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"devDependencies": {
"@babel/core": "^7.8.4",
"babel-types": "6.26.0",
"bs-platform": "^7.1.0",
"concurrently": "^5.1.0"
}
Expand Down