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

[Task] Fix npm deployments (extra 2000 TNBC bounty available) #69

Closed
Kycermann opened this issue Mar 5, 2021 · 5 comments
Closed

[Task] Fix npm deployments (extra 2000 TNBC bounty available) #69

Kycermann opened this issue Mar 5, 2021 · 5 comments
Labels
Bug Bounty Owed - 25 Reward in coin(s) bug Something isn't working PR Reward - 100 Reward in coin(s)

Comments

@Kycermann
Copy link
Contributor

Kycermann commented Mar 5, 2021

Task

Contributors are able to complete this task and earn thenewboston coins. Check out the labels to learn how much you can earn for contributing by completing this task. Please make sure to be honest if you wish to contribute by saying you can't finish this and we can just un-assign you with no harm done! There is no point in delaying tasks from being completed for miscommunication!

Overview

When you run npm install thenewboston, there's no dist directory. You can't then just require("thenewboston") without going inside node_modules/thenewboston and running npm install && npm run build first.

If you require("thenewboston") without going inside the module and running npm install && npm run build first, you get an error:

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

Error: Cannot find module '/Users/mieszkokycermann/Desktop/Projects/Mieszko-Exchange/Crypto-API/node_modules/thenewboston/dist/index.js'. Please verify that the package.json
 has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:344:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:557:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:911:27)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/mieszkokycermann/Desktop/Projects/Mieszko-Exchange/Crypto-API/src/crypto/impl/tnb.js:4:55)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/mieszkokycermann/Desktop/Projects/Mieszko-Exchange/Crypto-API/node_modules/thenewboston/package.json',
  requestPath: 'thenewboston'
}

When you npm install in your project root, the TNB module resets and you have to manually go in and set it up again.

Behavior

This task is complete when you can do npm install thenewboston and that installs with the dist directory already there (preferably deploy that directory to npm for faster installs but a pre-install script works too if that's a thing).

Please ask for this task to be assigned to you and earn and its sweet reward 😉

Remember to include your account number in your PR description for us to pay you 💰

@zinoadidi zinoadidi added bug Something isn't working PR Reward - 100 Reward in coin(s) labels Mar 5, 2021
@Kycermann
Copy link
Contributor Author

If this is closed in the next 24 hours, I will personally pay an additional bounty of 2000 TNBC.

@Kycermann Kycermann changed the title [Task] Fix npm deployments [Task] Fix npm deployments (extra 2000 TNBC bounty available) Mar 5, 2021
@zinoadidi
Copy link
Contributor

Would be nice if all issues identified that are not yet resolved concerning deployment are fixed through this issue.
Also don't forget, PR to development branch so we can have some sort of controlled deployment in future

@AbhayAysola
Copy link
Contributor

I was thinking we could do a releases workflow first and then do npm publish with the release assets. Would be simpler in the future if we are planning to add releases. If releases are not planned then we can go with the normal method. @zinoadidi @Kycermann

@Kycermann
Copy link
Contributor Author

@AbhayAysola whatever works long term is fine. I like the workflow idea. Maybe run build on GitHub actions and publish that.

@AbhayAysola
Copy link
Contributor

@AbhayAysola whatever works long term is fine. I like the workflow idea. Maybe run build on GitHub actions and publish that.

I meant using Github Releases. It's up to the repo maintainer to decide whether we have Releases or not.

@zinoadidi zinoadidi added the Bug Bounty Owed - 25 Reward in coin(s) label Mar 5, 2021
zinoadidi pushed a commit that referenced this issue Mar 7, 2021
* Update package.json to fix npm package issue #69

* install regenerator-runtime

* Remove postinstall script

* Install @babel/runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bounty Owed - 25 Reward in coin(s) bug Something isn't working PR Reward - 100 Reward in coin(s)
Projects
None yet
Development

No branches or pull requests

3 participants