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

Don't require polyfill unless needed #11

Open
Sanford284 opened this issue Sep 2, 2017 · 0 comments
Open

Don't require polyfill unless needed #11

Sanford284 opened this issue Sep 2, 2017 · 0 comments

Comments

@Sanford284
Copy link

D:\pro\node_modules\async-profile\node_modules\async-listener\index.js:3
if (process.addAsyncListener) throw new Error("Don't require polyfill unless n
eeded");
                              ^

Error: Don't require polyfill unless needed
    at Object.<anonymous> (D:\pro\node_modules\async-profile\node_modules\asyn
c-listener\index.js:3:37)
    at Module._compile (module.js:569:30)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (D:\pro\apm\nod
e_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\pro\node_modules\async-profile\lib\polyfill.js:5
:3)
    at Object.<anonymous> (D:\pro\node_modules\async-profile\lib\polyfill.js:4
9:4)
    at Module._compile (module.js:569:30)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (D:\pro\apm\nod
e_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\pro\node_modules\async-profile\lib\index.js:8:15
)
    at Object.<anonymous> (D:\pro\node_modules\async-profile\lib\index.js:175:
4)
    at Module._compile (module.js:569:30)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (D:\pro\apm\nod
e_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:/pro/apm/apis/index.js:5:20)
    at Module._compile (module.js:569:30)
    at loader (D:\pro\apm\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (D:\pro\apm\nod
e_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:/pro/apm/routes/users.js:5:22)
    at Module._compile (module.js:569:30)
    at loader (D:\pro\apm\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (D:\pro\apm\nod
e_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:/pro/apm/app.js:10:13)
    at Module._compile (module.js:569:30)
    at loader (D:\pro\apm\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (D:\pro\apm\nod
e_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\pro\apm\bin\www:7:11)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

Is It caused by babel-register??? I hava tried:

  • re-assign value to process.addAsyncListener
if(process.addAsyncListener) {
  process.addAsyncListener = null;
}
  • comment source code
// if(process.addAsyncListener){ throw new Error(...) }

but there is a new problem

D:\pro\node_modules\async-profile\node_modules\async-listener\glue.js:351
  for (var i = 0; i < length; ++i) list[i].listener();
                                           ^

TypeError: list[i].listener is not a function
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

1 participant