NodeJS API, Cannot find module 'yamlparser'
See original GitHub issueWhen trying the NodeJS API, I get the following error:
[Error: Cannot find module 'yamlparser' from 'mybuildpath/node_modules/useragent/lib']
Steps to reproduce (as suggested in readme):
npm install polyfill-service --save
npm install
require('polyfill-service').listAllPolyfills();
yamlparser is a dev dependency from the useragent module. From the old info (https://github.com/3rd-Eden/useragent/issues/29) I could find it’s intentionally a dev dependency when you use it you have to include it yourself in your package?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >yaml-parser - npm
yaml-parser is a fork of js-yaml whose goal is to remove command-line functionalities in order to provide a leaner module.
Read more >Error: Cannot find module in JavaScript [SOLVED]
We can solve Error: Cannot find module by installing the missing module. We can use npm tool to install the mising module.
Read more >useragent - high performance user agent parser for Node.js
API. Include the useragent parser in you node.js application: ... If we cannot find the family, they will default to Other .
Read more >js-yaml | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
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
I think I found the problem. I had a version mismatch between n and nvm for managing node versions(both where installed and used). I’m now using the proper latest version of node. Thanks for checking and sorry for wasting your time. Thanks :d
That’s okay, I’m happy you have it working 😄