Cannot find module '#ledgerhq/devices/hid-framing' - npm

I'm getting the following error when I make yarn start (The npm packages were previously installed without any problem). I'm using es5. The full error consists of these three errors:
Uncaught Error: Cannot find module '#ledgerhq/devices/hid-framing'
Uncaught ReferenceError: process is not defined
index.js:1 ./node_modules/#ledgerhq/hw-transport-webhid/lib-es/TransportWebHID.js
As far as I know, none of my packages depend on the #ledgerhq/devices package.
I have found some possible solutions, but none of them have worked. Among them I have tried:
I have installed it using
npm install #ledgerhq/devices
I tried adding "alias": {"#ledgerhq/devices": "#ledgerhq/devices/lib-es" } in package.json
I also tried running it using npm start -- --reset-cache

Related

Inexplicable Error When Starting React Native Project - TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')

I was working in my project with no problem, the last thing I had installed was the react-native-video-player and all was working well. I ran into a normal error, I think it was a typo I had just added, something simple, and it shut down the app, as expected. I fixed the error and tried to start the project again, to be greeted with the following error, seen in the title...
TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')
I then tried the usual slew of things I try when something in a file that I have no access to is bugging. I deleted node_modules and my package.lock.json and reran npm i. I kept getting the same error, proceeded by a few different ones. After trying numerous solutions, uninstalling different npm packages that I thought would be the culprit, and no success.
The way I got the errors and any errors proceeding the initial one kept changing, but now I've hit a wall. The phone simulator white screens, and I get the following three errors in my Metro Bundle Terminal:
TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
I then created a new branch where I deleted node_modules, package.lock.json, yarn.lock, and even my package.json. When I then tried to start the app using npx react-native run-is, I got the expected prompt to install React Native. I did, and it installed. Once it installed, I got the same error! If I run a search for the words involved with the error-- nothing, if I try to search for the page in which the error occurs-- nothing. So this means it HAS to be in the node_modules, as those are the only files where searches don't hit. I truly have no idea how to solve this, as I haven't used material icons anywhere (including my yarn.lock, my package.json, and my package.lock.json)
To summarize the steps I've tried to no avail (in no order, I don't remember anymore)...
deleted node_modules, package.lock.json and yarn.lock and ran npm i and yarn
deleted ios/pods and ios/build and ios/Podfile.lock and ran pod install
ran pod update
Some combination of 1, and 2
run npm uninstall material-icons
Deleted all node related, and yarn related files and directories and started fresh with a brand new react-native install
run yarn cache clean
run killall -9 node
run npm audit -fix
Restarted my machine
I should have tried this earlier, but it ended up being something messed up in the react-native-video-player. They had to have added something to it very recently, as I was successfully using it awhile ago. Gotta love when they up upload deprecated packages

ERROR TypeError: Cannot read property 'version' of undefined Vue.js

When I run npm start
I get
ERROR TypeError: Cannot read property 'version' of undefined
TypeError: Cannot read property 'version' of undefined
This happens after I have run
npm install
I tried to solve the issue by running npm -g install npm#version but instead it gave me this error
npm ERR! code ETARGET
npm ERR! notarget No matching version found for npm#version.
Did you just upgrade your dependencies directly from 3.0?
In v4 eslint is required as a dependency of the project itself.
So npm install --save-dev eslint#4 may fix the warning.
From my experience it may happen if there is import of package.json in one of your project's files, but with incorrect path.
Usually, some build related configurations use version property of the package.json.
It is hard to pinpoint the exact issue, since no specifics provided.
First, I'd search stack trace of the error to locate which file is requesting package.json. Global project search for .version should help to find the issue as well.
If you still unable to locate the issue, please, add full error stack trace.

npm cannot install some packages globally and locally?

I'm developing some JavaScript application with VSCode editor, and it says cannot find ESlint package. So i tried install it locally on app directory and globally, but both methods are failed. It gives following error(log file) and stops installation.
silly fetchPackageMetaData error for emoji-regex#^7.0.1 Unexpected end of JSON input while parsing near '...gex-7.0.1.tgz","fileC'
i tried to install package that causes the error and it also get failed, i cleared cache of npm with npm cache clean --force and re-install eslint package. And it worked.

Error: Can't resolve 'stream' in .... papaparse

Im getting this error using ngx-papaparse in angular. It was working, I then tried adding jquery to my project, and in the process was warned of security issues, so I followed instructions and tried npm audit fix. In the process something seems to have gone awry and now I'm getting...
ERROR in ./node_modules/papaparse/papaparse.min.js Module not found:
Error: Can't resolve 'stream' in
'/mnt/c/Users/j2wil/Documents/CodingDojo/projects/Scouts/public/node_modules/papaparse
I've tried a number of things including removing node_modules and npm install. Also deleting packages.json and reinstalling. But I keep seeing the same error.
I had the similar issue. Please try installing the stream package.
npm install stream --save

Getting webpack error "Module not found: Error: Cannot resolve module" in fluxible after re-installing node_modules

I have a fluxible project and I'm getting these errors after I deleted all files in node_modules and reinstalled with npm install -d when I try to run with npm run dev which is node webpack-dev-server.js & PORT=3001 nodemon start.js -e js,jsx. The app was working fine until I reinstalled dependencies.
Here's the fluxible template project
https://github.com/yahoo/generator-fluxible
What is causing these errors and how can I diagnose? Why did it work initially and then stopped working when I reinstalled node modules?
ERROR in ./client.js
Module not found: Error: Cannot resolve module 'node_modules/webpack/buildin/module.js' in /Projects/myproject
# ./client.js 1:0-49
ERROR in ./app.js
Module not found: Error: Cannot resolve module 'node_modules/webpack/buildin/module.js' in /Projects/myproject
# ./app.js 1:0-49
https://github.com/hapijs/qs/issues/128
I think it is a know issue. You can always go back to a previous version.