Error: Cannot find module 'ms'
See original GitHub issueThis is a
- Bug Report
- Feature Request
- Other
package.json
{
"name": "win",
"version": "1.0.0",
"description": "win",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"nightmare": "^3.0.1"
}
}
index.js
const Nightmare = require('nightmare')
const nightmare = Nightmare({ show: true })
nightmare
.goto('https://duckduckgo.com')
.type('#search_form_input_homepage', 'github nightmare')
.click('#search_button_homepage')
.wait('#r1-0 a.result__a')
.evaluate(() => document.querySelector('#r1-0 a.result__a').href)
.end()
.then(console.log)
.catch(error => {
console.error('Search failed:', error)
})
Compile:
> nexe -t x86-8.0.0
i nexe 2.0.0-rc.28
RUN
√ Downloading...100%
√ Entry: 'index.js' written to: s.exe
√ Finished in 17.967s
ERROR:
C:\Users\admin\Desktop\s>s.exe
module.js:487
throw err;
^
Error: Cannot find module 'ms'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at u (C:\Users\admin\Desktop\s\s.exe:3883:1092)
at f (C:\Users\admin\Desktop\s\s.exe:3883:1430)
at c (C:\Users\admin\Desktop\s\s.exe:3883:2731)
at b.require (C:\Users\admin\Desktop\s\s.exe:3883:3327)
at Object.<anonymous> (C:\Users\admin\Desktop\s\s.exe:423:20)
at c (C:\Users\admin\Desktop\s\s.exe:3883:3565)
- Platform(OS/Version): Windows 10, 64b
- Host Node Version: v8.4.0
- Target Node Version: v.8.0.0 and v8.4.0
- Nexe version: Last (2.0.0-rc.28)
- Python Version: Python 3.6.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Error: Cannot find module 'ms' - node.js - Stack Overflow
I'm closer than I have been so far, but am now getting the "Cannot find module error" when trying to launch my application....
Read more >Error: Cannot find module 'ms' after latest release #10 - GitHub
It looks like the "ms" was added to devDependencies. But as it lives in the index file, it should be a added as...
Read more >How to resolve "Cannot find module" error in Node - Sabe.io
To fix the Cannot find module error, simply install the missing modules using npm . To so, you can use the following command:...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
When you get the “cannot find module” error, or “module not found”, it means you've not installed the package you're trying to use....
Read more >Node.js – Error: Cannot find module 'ms' - iTecNote
Node.js – Error: Cannot find module 'ms'. modulenode.js. I've been trying to get my app running for a few days now, but keep...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When will this fix be merged and released ?. Unable to use the package due to similar error on runtime. Application works fine without packaging.
Did anyone found the solution? I need it urgently but every attempt I tried failed