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

Latest release 0.1.17 breaks dependent modules #50

Open
valichek opened this issue May 30, 2017 · 11 comments
Open

Latest release 0.1.17 breaks dependent modules #50

valichek opened this issue May 30, 2017 · 11 comments

Comments

@valichek
Copy link

I use copy-webpack-plugin, and it started to throw errors. I have found that only node-dir npm have been updated recently to 0.1.17. Installing 0.1.16 explicitly solves the problem with copy-webpack-plugin

@valichek
Copy link
Author

I use [email protected]

@elenadimitrova
Copy link

truffle breaks as well with

TypeError: path must be a string
    at TypeError (native)
    at Object.fs.stat (fs.js:830:11)
    at Object.files (/opt/circleci/nodejs/v4.8.3/lib/node_modules/truffle/node_modules/node-dir/lib/paths.js:164:8)

@trickeyone
Copy link

Confirmed. I use copy-webpack-plugin@^3.0.1 as well and the node-dir@0.1.17 build brakes the plugin. Implicitly installing 0.1.16 fixed the issue.

@bschwehn
Copy link

bschwehn commented May 31, 2017

We also had an issue in a build using copy-webpack-plugin with error message "TypeError: this is not a typed array." or "ERROR in this is not a typed array."

The issue occurs when using node version < 6. I asssume because Buffer.from introduced in b40a44a is not compatible with node < 6.

I guess the bug is that package json of node-dir claims compatibility with

"engines": {
"node": ">= 0.10.5"
},

We downgraded to [email protected] which resolved the issue for us for now.

@evanshortiss
Copy link

evanshortiss commented May 31, 2017

I opened another issue prior to seeing this one. Here's my 2 cents from that other issue.

TLDR: Rollback 0.1.17 and make a 0.1.18 that matches 0.1.16, then release a 1.0.0 with breaking changes since people seem to think ^ is safe...

In the latest release published ('0.1.17': '2017-05-30T11:07:09.749Z') it seems to have broken compatibility with node.js 4.X. The module make use of Buffer.from, but this is not supported in node.js v4.

Would you be open to making a new patch release of 0.1.18 that removes reliance on Buffer.from, and perhaps is simply 0.1.16 code all over again to fix peoples builds? After this then publish a 1.0.0? The reason I suggest a 1.0.0 is because copy-webpack-plugin relies on this module as a ^ dependency, so even if you release 0.2.0 with Buffer.from it will still cause issues for many people making builds with node.js 4.X - a 1.0.0 avoids this issue and makes sense since it's not a backwards compatible change. In a 1.0.0 it would make sense to set "engines" in package.json to >=6.x too.

Obviously this is a bit of a big ask, but would be very much appreciated by many folks I think 😄

@nehaabrol87
Copy link

We are using node 4.2.4 and copy-webpack-plugin version 1.1.1 and seems like copy has stopped working.Curious what can be done to unblock us atm.

@s-nel
Copy link

s-nel commented Jun 6, 2017

Also affects transfer-webpack-plugin v 0.1.4

@evanshortiss
Copy link

You can add "node-dir": "0.1.16" to your own package.json as a workaround for now at least - might only work if you use a slightly newer npm, but we're good.

chrisgarrity added a commit to chrisgarrity/scratch-www that referenced this issue Jun 16, 2017
FIxes problem where webpack wasn’t copying static or intl to the build directory.

Gory details:
node-dir is a dependency of copy-webpack-plugin. If you don’t already have it installed, the latest version (0.1.17) gets installed and that one breaks copy-webpack (fshost/node-dir#50). Webpack build will complete. but there will be an error `ERROR in this is not a typed array.` We didn’t see it earlier because node-modules are cached.
chrisgarrity added a commit to scratchfoundation/scratch-www that referenced this issue Jun 20, 2017
FIxes problem where webpack wasn’t copying static or intl to the build directory.

Gory details:
node-dir is a dependency of copy-webpack-plugin. If you don’t already have it installed, the latest version (0.1.17) gets installed and that one breaks copy-webpack (fshost/node-dir#50). Webpack build will complete. but there will be an error `ERROR in this is not a typed array.` We didn’t see it earlier because node-modules are cached.
@AckerApple
Copy link
Contributor

AckerApple commented Aug 10, 2017

I forked this project long ago and it's in use by many. I just published to npm. Works the same only better, give it a try:

https://www.npmjs.com/package/path-reader

@justinbowes
Copy link

justinbowes commented Sep 19, 2017

Can confirm that path-reader was a working drop-in replacement for my project.

@AckerApple
Copy link
Contributor

I like the terminology of "drop-in replacement". Going to start using that in my republish of forks. Way better than plug-n-play replacement or other cheesy variant.

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

9 participants