You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/03/04 04:43:05 UTC

[GitHub] [openwhisk-wskdebug] alexkli opened a new issue #9: [bug] [nodejs] mount-require is only reloading the main source file, not any other required files

alexkli opened a new issue #9: [bug] [nodejs] mount-require is only reloading the main source file, not any other required files
URL: https://github.com/apache/openwhisk-wskdebug/issues/9
 
 
   _Moved from https://github.com/adobe/wskdebug/issues/45_
   
   With an action project structure like this:
   ```
   package.json
   core.js
   lib/
     helper.js
   ```
   
   where core.js does `require('./lib/helper.js')` and a `wskdebug` invocation such as
   
   ```
   wskdebug core core.js -l
   ```
   
   it will see all file changes, but it won't actually reload anything other than the main file (`core.js`). This is because here
   
   https://github.com/adobe/wskdebug/blob/master/src/kinds/nodejs/mount-require.js#L37
   
   we are only clearing the require cache for the main file. It should also delete any subpaths or _all_ deps (maybe someone did an `npm install` in between and `node_modules` should also be reloaded).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk-wskdebug] rabbah closed issue #9: [nodejs] mount-require is only reloading the main source file, not any other required files

Posted by GitBox <gi...@apache.org>.
rabbah closed issue #9: [nodejs] mount-require is only reloading the main source file, not any other required files
URL: https://github.com/apache/openwhisk-wskdebug/issues/9
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk-wskdebug] alexkli commented on issue #9: [nodejs] mount-require is only reloading the main source file, not any other required files

Posted by GitBox <gi...@apache.org>.
alexkli commented on issue #9: [nodejs] mount-require is only reloading the main source file, not any other required files
URL: https://github.com/apache/openwhisk-wskdebug/issues/9#issuecomment-602160126
 
 
   Links:
   - https://github.com/sindresorhus/clear-module
   - https://stackoverflow.com/questions/23685930/clearing-require-cache/23686122#23686122

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services