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

Update package.json to include published files #67

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

jwerle
Copy link
Contributor

@jwerle jwerle commented Aug 14, 2018

List the files that will be published to npm in the package.json so tools like pkg can correctly resolve files that are listed there.

Running pkg with any module that requires ethereumjs-wallet will result in the following error:

> Error! Error: EACCES: permission denied, scandir '/lost+found'

Correcting /*.js to *.js fixes this. 🙌

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.462% when pulling 7b1082c on jwerle:patch-1 into 4c7cbfc on ethereumjs:master.

@holgerd77
Copy link
Member

Hi @jwerle, I think I had a reason on adding the slash here. Can you please provide a list with the files added to a local package creation with and without the change?

@jwerle
Copy link
Contributor Author

jwerle commented Aug 17, 2018 via email

@jwerle
Copy link
Contributor Author

jwerle commented Aug 17, 2018

@holgerd77 Please see https://github.com/jwerle/pkg-ethereumjs-wallet-reproduction which contains two branches, one to show a failed run of pkg in a branch called broken-master, and another called fixed-patch which points to the patch in this pull request.

broken-master branch

Running the pkg script produces the following error

 √ npm run pkg

> pkg-ethereumjs-wallet@1.0.0 pkg /home/werle/repos/arablocks/reproductions/pkg-ethereumjs-wallet
> pkg index.js

> pkg@4.3.4
> Targets not specified. Assuming:
  node10-linux-x64, node10-macos-x64, node10-win-x64
> Error! Error: EACCES: permission denied, scandir '/lost+found'
    at Object.readdirSync (fs.js:750:3)
    at exports.readdir (/usr/local/lib/node_modules/pkg/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/usr/local/lib/node_modules/pkg/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/usr/local/lib/node_modules/pkg/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at Readable.DirectoryReader.stream._read (/usr/local/lib/node_modules/pkg/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (_stream_readable.js:449:10)
    at readdirSync (/usr/local/lib/node_modules/pkg/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/usr/local/lib/node_modules/pkg/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/usr/local/lib/node_modules/pkg/node_modules/fast-glob/out/providers/reader-sync.js:61:24)
    at ReaderSync.api (/usr/local/lib/node_modules/pkg/node_modules/fast-glob/out/providers/reader-sync.js:53:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! pkg-ethereumjs-wallet@1.0.0 pkg: `pkg index.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the pkg-ethereumjs-wallet@1.0.0 pkg script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/werle/.npm/_logs/2018-08-17T15_58_29_575Z-debug.log

fixed-patch

Running the pkg script is successful with the change made in this PR

 √ npm run pkg

> pkg-ethereumjs-wallet@1.0.0 pkg /home/werle/repos/arablocks/reproductions/pkg-ethereumjs-wallet
> pkg index.js

> pkg@4.3.4
> Targets not specified. Assuming:
  node10-linux-x64, node10-macos-x64, node10-win-x64
> Warning Cannot find module 'ethereumjs-wallet' from '/home/werle/repos/arablocks/reproductions/pkg-ethereumjs-wallet'
  /home/werle/repos/arablocks/reproductions/pkg-ethereumjs-wallet/index.js
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  /home/werle/repos/arablocks/reproductions/pkg-ethereumjs-wallet/node_modules/scrypt/build/Release/scrypt.node
  path-to-executable/scrypt.node

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ok, tested this locally with npm pack and then having a look at the generated tarball, package content stays the same. Thanks for the PR!

@holgerd77 holgerd77 merged commit 95683dd into ethereumjs:master Sep 24, 2018
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.

None yet

3 participants