npm module error on 'inflight' when attempting to build semantic UI - npm

I'm attempting to use the React Starter Kit with SemanticUI on Windows. I can install and build RSK, but when I run npm install semantic-ui and go through the set up, I always hit the same module error and I am unsure how to solve it.
gulp build
module.js:341
throw err;
^
Error: Cannot find module 'inflight'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\Users\Alex\AppData\Roaming\npm\node_modules\gulp\node_modules\glob\glob.js:57:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
I have tried nuking the directory and reinstalling multiple times, but I am unable to get this to work. What is causing the issue?

You may be hitting the same issues people are having on npm 2701. The issue appears to be related to version updates between installing NPM modules (from a quick read over the later parts of the report). Suggestions include running:
npm set registry https://registry.npmjs.org/
And alternatively, removing all currently installed node modules including globally installed modules (in /usr/node-modules/ or C:\Program Files\nodejs\node_modules for example). The user deleted them manually (i.e. not using npm).

I also faced same issue while running react app. I simply installed it
npm install inflight
Although after it there prompt another error msg which was failed to find moudule 'source-list-map' then I installed it as well
npm install source-list-map
I hope it will help you

Related

Facing issues while trying to init Bubblewrap for TWA installation

I am new to Bubblewrap. I downloaded Node.js and then did npm i -g #bubblewrap/cli. It threw some warnings, but it did finish.
After this, when I am doing bubblewrap init --manifest https://beegle.app/bpro-manifest.json, I am getting some errors which I don't understand and don't know how to solve.
Here are the error messages:
[Mukeshs-MacBook-Air:beeglepro-bubblewrap mghatiya$ bubblewrap init --manifest https://beegle.app/bpro-manifest.json
internal/util.js:206
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
^
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
at promisify (internal/util.js:206:11)
at Object.<anonymous> (/Users/mghatiya/.nvm/versions/node/v8.9.3/lib/node_modules/#bubblewrap/cli/node_modules/get-stream/index.js:7:35)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/mghatiya/.nvm/versions/node/v8.9.3/lib/node_modules/#bubblewrap/cli/node_modules/fetch-h2/dist/lib/body.js:6:22)
What is going wrong?
It looks like I had old version of Node.js installed and for whatever reason, even though I had just downloaded Node.js from the website, the latest one was not loaded or it was not loaded at the correct place or whatever.
So basically warnings thrown by npm i -g #bubblewrap/cli were indeed strong ones and it had not completed its job.
I upgraded to the latest Node.js version with nvm install node --reinstall-packages-from=node and now the errors that I posted have gone in the bubblewrap init action.
Of course, as is the case with all development things, now I face the new errors and warnings.
I was using Windows with npm in version 8.16.2 (nvm). Thanks #mukesh for pointing that point. Following nvm list and nvm use 14.18.0, I reinstalled bubblewrap and the bubblewrap init command worked this time.

React install problems with npm

When I run npx create-react-app, I had these errors. Maybe someone knows whats it's wrong? P.S. also had tried npm-install -g create-react-app.
C:\Users\Deividas\Desktop\PAMEGINIMAS>create-react-app my-app
internal/modules/cjs/loader.js:621
throw e;
^
Error: No valid exports main found for 'C:\Users\Deividas\AppData\Roaming\npm\node_modules\create-react-app\node_modules\is-promise'
at resolveExportsTarget (internal/modules/cjs/loader.js:618:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:650:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:948:27)
at Function.Module._load (internal/modules/cjs/loader.js:854:27)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\Deividas\AppData\Roaming\npm\node_modules\create-react-app\node_modules\run-async\index.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:1128:30) {
code: 'MODULE_NOT_FOUND'
}
This seems to be a recent problem with npm. There is an issue open as of the last few hours and it seems like people are working on it. I don't think it's anything to do with yourproject.
The issue
While the issue is being fixed: try installing node version 12.12.0 as shown below (if using nvm) and run create-react-app again.
nvm install 12.12.0
nvm use 12.12.0
I'd try to clear your cache npm cache clean --force. What version of node and npm are you using?

using npm to run code in folders in tutorial downloaded from github

I'm new to npm and I can't understand how to run a tutorial I found on GitHub. I suspect it has something to do with my lack of knowledge of npm
The tutorial is this one: https://github.com/IrfanBaqui/react-router-v4-tutorial
I'm on Windows 7.
I first tried running serving the index.html pages inside each folder via XAMPP... however, that didn't work (I just get a blank page).
Next, I tried navigating inside a folder via the command prompt and running npm start... that didn't work either... (I do have npm and node.js globally installed)
I get this error:
Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:469:1
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Documents\Downloads\Irfan Baqui react-router-v4-tutorial-m
ct_Components\server.js:2:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Advice would be appreciated.
Inside each sub folder you need to do
npm install it will install every lib you need.
npm start it will run the project
The server should be running. To access the site it should be localhost:9000
Well #sheplu has already answered your question. I would just like to let you know why it is needed.
It is a node project. The guys whose code you are trying to run have used many of the dependencies for each lesson (each folder in his repository).
what npm-install does is, download and resolves all the dependencies used in the project specified in the file named package.json. So, whenever you see a file package.json it would be there specifying dependencies for dev or prod environment.
So, run npm-install in the directory where you see package.json file.
There can be another file bower.json with the same purpose (listing the required dependencies). if you see bower.json, you should run bower-install in that case.
And finally the script to run the project. npm start in your case.
And the error you just posted is clearly saying that some-module not found or could not resolve or something like that. That is because, you've resolved the dependencies required, which you'll have to using npm-install or bower-install for package.json and bower.json respectively

Cannot find module 'npmlog'

Hello I receive the following message when trying to install npm. I downloaded the most recent node.js but it doesn't seem to download npm. I keep getting the belowenter code here error message after deleting node.js and reinstalling it.
When I try installing node.js I don't see the following being created:
C:\Users\Efren Barragan\AppData\Roaming\npm
This is the first time installing node.js. I just installed it on my old computer and it worked out fine. I am new to this so so your patience is much appreciated! Thanks!
C:\Users\Efren Barragan> npm install npm -g
module.js:327
throw err;
^
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at C:\Users\Efren Barragan\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:19:13
at Object.<anonymous> (C:\Users\Efren Barragan\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:75:3)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
Due to the bug in versions this is what i did -
I have faced the same issue in my Windows 10 PC. After looking into solutions, since i couldn't find the exact solution for the issue i was facing
Cannot find module 'npmlog'
I just uninstalled the node js and then, deleted both 'npm' and 'npm-cache' in
"C:\Users\YourPCName\AppData\Roaming"
Then, i downloaded the latest version of node from Node JS Website
And, installed node js
After that i checked with the path in environment variables.
Finally run the command prompt 'run as administrator' and npm install npm -g
Checking your version will show the latest version. 'npm -v'
I got the latest version - v3.10.9
Try this. this should work.
Install a newer version, it's been a bug in previous version.

Visual Studio Team Services: GULP build task failing on 'CANNOT FIND MODULE'

I am trying to set up a CI for my project team. I am pushing an angular/node project to a git repo in Team Services. The build triggers fine until it hits the gulp task. Before that gulp task run steps 1-3:
1. npm config set cache C:\Dev\nodejs\npm-cache --global
2. npm install
3. npm cache clean
**4. gulp default**
5. deploy to azure
The reasons for steps 1 & 2 is because npm install was failing until i set the cache.
my error output:
2016-04-28T17:51:21.0694993Z [command]C:\NPM\Modules\gulp.cmd default --gulpfile C:\a\1\s\PolicyUI\PolicyUI\gulpfile.js --packagePath=C:\a\1\a
2016-04-28T17:51:25.1707118Z module.js:338
2016-04-28T17:51:25.1707118Z throw err;
2016-04-28T17:51:25.1717126Z ^
2016-04-28T17:51:25.1717126Z Error: Cannot find module 'merge-stream'
2016-04-28T17:51:25.1717126Z at Function.Module._resolveFilename (module.js:336:15)
2016-04-28T17:51:25.1727127Z at Function.Module._load (module.js:278:25)
2016-04-28T17:51:25.1727127Z at Module.require (module.js:365:17)
2016-04-28T17:51:25.1738110Z at require (module.js:384:17)
2016-04-28T17:51:25.1747120Z at Object.<anonymous> (C:\a\1\s\PolicyUI\PolicyUI\gulpfile.js:8:13)
2016-04-28T17:51:25.1747120Z at Module._compile (module.js:460:26)
2016-04-28T17:51:25.1757124Z at Object.Module._extensions..js (module.js:478:10)
2016-04-28T17:51:25.1757124Z at Module.load (module.js:355:32)
2016-04-28T17:51:25.1767126Z at Function.Module._load (module.js:310:12)
2016-04-28T17:51:25.1767126Z at Module.require (module.js:365:17)
merge-stream IS there locally and works fine on my machine.
Does anyone know why this fails???
Whenever a build happens in team services, is that an isolated powershell environment where it is building??
We had a similar issue in our team. We had to modify the powershell script manually to point to the right location of the gulp file. There were some path issues in the default script provided. Please look into it and you may find some answers.
Thank you.