You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var needless = require('needless');
var libpath = '../libs/a';
needless(libpath);
require(path).callFunction(xxx)
then run run/run.js
node run/run.js
node will report:
Cannot find module '../libs/a'
I check the code, it seems the relative path '../libs/a' hasn't been process proper,but if i move run.js to upper level directory and modify the '../libs/a' to './libs/a' then it's ok.
The text was updated successfully, but these errors were encountered:
If i have the directory as following
code in run.js
then run run/run.js
node will report:
I check the code, it seems the relative path '../libs/a' hasn't been process proper,but if i move run.js to upper level directory and modify the '../libs/a' to './libs/a' then it's ok.
The text was updated successfully, but these errors were encountered: