-
Notifications
You must be signed in to change notification settings - Fork 7
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
Replace module-alias with ttypescript #47
Conversation
@gnidan I spent some time trying to remove |
I'll be in meetings for much of the workday today, but I'll put this on my list for afterwards. In the meantime, can you go into the ethpm.js source directory, do a build, and then run:
and see what happens? |
Nice, yeah I've been playing around with this and am left scratching my head.
> require.resolve('.')
'/Users/nickgheorghita/ethereum/ethpm.js/dist/index.js'
> const { EthPM } = require(".");
undefined
> await EthPM.configure({manifest: "ethpm/manifests/v3"}).connect({})
{ Error: Cannot find module 'ethpm/manifests/v3'
at Object.configure (/Users/nickgheorghita/ethereum/src/ethpm.ts:39:12)
at new map (/Users/nickgheorghita/node_modules/src/session/session.ts:20:10)
at Array.map (<anonymous>)
at load (/Users/nickgheorghita/node_modules/src/session/session.ts:21:29)
at Object.originalRequire [as load] (/Users/nickgheorghita/node_modules/src/config/loader.ts:11:7)
at require (internal/modules/cjs/helpers.js:22:18)
at Module.require (internal/modules/cjs/loader.js:637:17)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) code: 'MODULE_NOT_FOUND' } I can't figure out why the stack trace is 1) running typescript and 2) jumping around to |
Ah right, for this:
The problem is that, now that module-alias is gone, nothing tells Node's runtime how to find that module name. I think the solution here requires looking for |
... and also update configuring EthPM to use internal EthPM packages - Use originalRequire() for non-internal module configurations - Use regular require() for loading EthPM.js internals, replacing user-provided absolute paths with project-relative versions
Switch to using ttypescript in gulp
… into module-alias
No description provided.