Closed Kordonme closed 8 years ago
this line:
[22:57:00] Error: Cannot find module 'mocks\servers.js'
why does it include a backslash (the escape character) rather than a forward slash? odd..
are you on Windows? if so, which version?
That is odd, yes. Didn't notice that. And yes, Windows 10, node --version: v5.1.1
I tried putting the mock js file (servers.js
) in same directory. Works fine. Is this a module loading problem on Windows maybe?
checking now, should be a quick fix
finally reproduced after testing on Windows 8 and 10.. while i fix, please test this config for me (static option value removed).. it should behave the same as ws defaults to the current directory..
lws({
'mocks': [{
'route': '/',
'module': '/mocks/servers.js'
}]
}).listen(2650)
Thanks!
I tried that already and I'm getting an error:
[00:07:46] TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.win32.join (path.js:221:5)
Same line in local-web-server.js
.
fixed in v1.0.2.. please update and try again.
You are the best - works like a charm!
good, pleased you like it! If you have any other ideas about how to improve it, let me know :+1:
Already scratched my head for far too long...
Got this config:
Happens on line 151. Basically, it's not able to load the file. However, if I remove the 'module' property, the server starts (of course), and I'm able to navigate to
/mocks/servers.js
and get the content.