We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use Typescript with a basePath setting, so that I can require my files from an absolute base path:
import navigation from 'redux/interfaces/navigation'
This gets transpiled to:
const _navigation = require('redux/interfaces/navigator')
The redux folder is in ./src/internal, so I have to set NODE_PATH accordingly.
I want to use iron-node to debug my mocha unit test, which I can execute like this:
NODE_PATH=./src/internal node node_modules/mocha/bin/_mocha --opts mocha.opts 'tests/**/*.spec.ts' 'tests/**/*.spec.tsx'
This works, but if I replace node with iron-node, it cannot find the files in ./src/internal (see error log below)
I reproduced the issue with the following 2-file setup:
module.exports = { a: true }
const _navigation = require('redux/interfaces/navigation') console.log(_navigation.a)
NODE_PATH=./src/internal node test/test.js
NODE_PATH=./src/internal iron-node test/test.js
Expected behavior: [What you expect to happen]
iron-node should run without errors and find the required file.
require
Actual behavior: [What actually happens]
iron-node does not find the required file.
Reproduces how often: [What percentage of the time does it reproduce?]
Always.
Screenshot(s): [Screenshot(s) or animated gifs of the error situtaion]
Error log(s): From devTools console or shell terminal
app.js:197 ironNode boot /usr/lib/node_modules/iron-node/app/require-custom-wrap.js:32 Object {v8: Object, app: Object, workSpaceDirectory: function} app.js:268 ModedModule {} app.js:58 Error: Cannot find module 'redux/interfaces/navigation' - reset-search-paths.js:35 Function.Module._resolveFilename [lib]/[iron-node]/[electron]/dist/resources/electron.asar/common/reset-searc h-paths.js:35:12 - module.js:20 require internal/module.js:20:19 - test.js:1 Object.<anonymous> /tmp/test-project/test/test.js:1:176 - test.js:3 Object.<anonymous> /tmp/test-project/test/test.js:3:3 error @ app.js:58 emitOne @ events.js:96 emit @ events.js:191 window.onerror @ /usr/lib/node_modules/iron-node/node_modules/electron/dist/resources/electron.asar/renderer/init.js:135 app.js:59 Details Error: Cannot find module 'redux/interfaces/navigation' at Module._resolveFilename (module.js:470) at Function.Module._resolveFilename (/usr/lib/node_modules/iron-node/node_modules/electron/dist/resources/electron.asar/common/reset-sea…:35) at Function.Module._load (module.js:418) at Module.require (module.js:498) at require (internal/module.js:20) at Object.<anonymous> (/tmp/test-project/test/test.js:1) at Object.<anonymous> (/tmp/test-project/test/test.js:3) at Module._compile (module.js:571) at Object.Module._extensions..js (module.js:580) at Module.load (module.js:488) error @ app.js:59 emitOne @ events.js:96 emit @ events.js:191 window.onerror @ /usr/lib/node_modules/iron-node/node_modules/electron/dist/resources/electron.asar/renderer/init.js:135
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I use Typescript with a basePath setting, so that I can require my files from an absolute base path:
This gets transpiled to:
The redux folder is in ./src/internal, so I have to set NODE_PATH accordingly.
I want to use iron-node to debug my mocha unit test, which I can execute like this:
This works, but if I replace node with iron-node, it cannot find the files in ./src/internal (see error log below)
Steps to Reproduce
I reproduced the issue with the following 2-file setup:
NODE_PATH=./src/internal node test/test.js
NODE_PATH=./src/internal iron-node test/test.js
Expected behavior: [What you expect to happen]
iron-node should run without errors and find the
require
d file.Actual behavior: [What actually happens]
iron-node does not find the
require
d file.Reproduces how often: [What percentage of the time does it reproduce?]
Always.
Screenshot(s): [Screenshot(s) or animated gifs of the error situtaion]
Error log(s): From devTools console or shell terminal
Version(s)
The text was updated successfully, but these errors were encountered: