Not download npm automaticly
let moment = require('moment');
Error: Cannot find module 'moment'
I think it will download the npm package automaticly, is it a BUG?
I'll test it once I have access to my machine
@cloudqq It works fine for me. Can you increase execution timeout preferences and try again?
I've adjusted the "excution Timout“ to 600000, but nothing happened. How to enable debug log?
@cloudqq Got same error? Can you join in gitter to discuss further?
Run with --debug flag to enable developer tool View > Toggle Developer Tools
mancy . --debug
Automatic download path
| Platform | Download Path |
|---|---|
| Windows | C:\Users%USERNAME%\AppData\Local\mancy\node_modules |
| OS X | ~/Library/Application Support/mancy/node_modules |
| Linux | ~/.config/mancy/node_modules |
it doesn't download on demand on my machine too.
require('whatwg-fetch')
Error: Cannot find module 'whatwg-fetch'
at Function.Module._resolveFilename (module.js:338:15)
at Module._load (module.js:289:25)
at Function._module3.default._load (/Users/fibric/Applications/Mancy.app/Contents/Resources/app/common/ReplContext.js:117:14)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at mancy-repl:1:1
at ContextifyScript.cxt.runInContext (/Users/fibric/Applications/Mancy.app/Contents/Resources/app/common/ReplContext.js:203:18)
at Object.runInContext (/Users/fibric/Applications/Mancy.app/Contents/Resources/app/common/ReplCommon.js:427:23)
at ReplActiveInput.transpileAndExecute (/Users/fibric/Applications/Mancy.app/Contents/Resources/app/components/ReplActiveInput.js:678:32)
at /Users/fibric/Applications/Mancy.app/Contents/Resources/app/components/ReplActiveInput.js:843:20
I had to install it manually. Maybe it doesn't install because node_modules doesn't exist.
# fibric @ fibrics-Mac-Pro in ~/Library/Application Support/mancy [2:04:58]
$ ls
DevTools Extensions GPUCache Local Storage
# fibric @ fibrics-Mac-Pro in ~/Library/Application Support/mancy [2:04:59]
$ npm i whatwg-fetch
/Users/fibric/Library/Application Support/mancy
└── [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/Users/fibric/Library/Application Support/mancy/package.json'
npm WARN mancy No description
npm WARN mancy No repository field.
npm WARN mancy No README data
npm WARN mancy No license field.
require('whatwg-fetch'); Object {} __proto__ : Object {}
@fibric can you try adding below log and debug here ?
console.log('request' , request, 'paths', parent.path, 'path', path)
console.log(ex)
@princejwesley In debug mode it downloads automatically without any error. I had this error only once after packaging an OSX build, but this electron build doesn't open the devTools. Don't see the log outputs, nothing logged in console.app.
@fibric context.console.log logs to application. we have to pass --debug flag to enable chrome dev tool.
Mancy 🙈 ₹ git:(master) dist/Mancy-darwin-x64/Mancy.app/Contents/MacOS/Electron . --debug
I had this happen to me too.
I didn't have a node_modules folder inside " ~/Library/Application Support/mancy/node_modules". Once I created it everything started working fine. I guess it just expects the folder to exist.