I get this error while doing an npm start:
PS C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader> npm start
> react-box#0.1.0 start C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader
> node scripts/start.js
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module 'dotenv'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader\scripts\
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-box#0.1.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-box#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output ab
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Concierge\AppData\Roaming\npm-cache\_logs\2018-11-17T04_27_59_461Z-debug
PS C:\Users\Concierge\downloads\prod\pdf2\ipfs_image_uploader>
and when I run command npm install, I get this error:
> scrypt#6.0.3 preinstall /Users/user/Documents/pdfuploader/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /Users/user/Documents/pdfuploader/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/Documents/pdfuploader/node_modules/scrypt
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-11-18T05_45_00_864Z-debug.log`
I tried to set up the pythonpath like here: https://www.tutorialspoint.com/How-to-set-your-python-path-on-Mac but it didn't help
I just sort it out by using this tutorial to insert that path /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages :
https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
but then again i got that error when npm run start: `users-Air:pdfuploader user$ npm run start
client#0.1.0 start /Users/user/Documents/pdfuploader
react-scripts start
Could not find a required file.
Name: index.html
Searched in: /Users/user/Documents/pdfuploader/public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-11-18T06_44_50_004Z-debug.log`
Files which i am trying to npm run start:
https://github.com/damianjnc/pdfuploader
Some of the nodeJS modules are written in c++, and need to be compiled when being installed. This process requires python2 to be installed. Now, most Macs actually have python2 installed by default, but 'python' might not be on your executables path yet.
On a Mac, the python application is typically located at /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7. If there is no 'Python.framework' folder in /System/Library/Frameworks/ you will need to install python. If it is there, then simply symlink the previously mentioned python2.7 executable in /usr/bin. Also ensure that /usr/bin is present on your executable path by typing echo $PATH on your terminal.
To create a symlink run:
cd /usr/bin
sudo ln -s /path/to/original/python python
Related
I have cloned my project from git and when trying to do the npm install, it's not working.
I can't fix any of the errors - for example when trying to fix the core-js error with npm install --save core-js#^3 I still get the same message, that I need to upgrade.
Why is this happening? there were no errors before I cloned this repo?
npm WARN deprecated #babel/polyfill#7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the #babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm ERR! code 1
npm ERR! path C:\Users\User\Desktop\mydailyprep\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#14.16.1 | win32 | x64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! gyp ERR! System Windows_NT 10.0.17134
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\Desktop\\myapp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\User\Desktop\mydailyprep\node_modules\node-sass
npm ERR! gyp ERR! node -v v14.16.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2021-04-09T10_33_10_047Z-debug.log
Try :
npm cache clean --force
npm install
Even I faced same kind of issue... might be this may be helpful to you.. :)
I have created a folder called "projects (Folder Name)" in that I have taken the clone of my project - called "xyz project (projects >> xyz project)"..
now by mistake I tried to install - npm install in "projects folder (parent folder)"..
but node modules have to be installed in "xyz project" (child folder)
So when I have used npm i... in xyz project... then node modules have installed SUCCESSFULLY..
Try this..
I'm trying to install the npm library "Sharp" but when I try to run the npm install command, I get this in my console:
> sharp#0.18.2 install C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp
> node-gyp rebuild
C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp>if not
defined npm_config_node_gyp (node
"C:\Users\apixe\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-
bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node ""
rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: Cannot find module 'minimatch'
gyp ERR! stack at Function.Module._resolveFilename (module.js:485:15)
gyp ERR! stack at Function.Module._load (module.js:437:25)
gyp ERR! stack at Module.require (module.js:513:17)
gyp ERR! stack at require (internal/module.js:11:18)
gyp ERR! stack at Object.<anonymous> (C:\Users\apixe\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\install.js:23:17)
gyp ERR! stack at Module._compile (module.js:569:30)
gyp ERR! stack at Object.Module._extensions..js (module.js:580:10)
gyp ERR! stack at Module.load (module.js:503:32)
gyp ERR! stack at tryModuleLoad (module.js:466:12)
gyp ERR! stack at Function.Module._load (module.js:458:3)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\apixe\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
npm WARN discord.js#11.1.0 requires a peer of bufferutil#^3.0.0 but none was installed.
npm WARN discord.js#11.1.0 requires a peer of erlpack#hammerandchisel/erlpack but none was installed.
npm WARN discord.js#11.1.0 requires a peer of node-opus#^0.2.5 but none was installed.
npm WARN discord.js#11.1.0 requires a peer of opusscript#^0.0.3 but none was installed.
npm WARN discord.js#11.1.0 requires a peer of sodium#^2.0.1 but none was installed.
npm WARN discord.js#11.1.0 requires a peer of libsodium-wrappers#^0.5.1 but none was installed.
npm WARN discord.js#11.1.0 requires a peer of uws#^0.14.1 but none was installed.
npm WARN gsbot#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! sharp#0.18.2 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the sharp#0.18.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\apixe\AppData\Roaming\npm-cache\_logs\2017-09-02T23_37_17_871Z-debug.log
I have done hours of research trying to figure this out but no luck. If anyone can help, I'd be very thankful.
When i run my first react app using npm start command some error is displayed. Please some one help me to resolve this issue.
C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-server\bin\webpack-dev-server.js:386
throw e;
^
Error: `output.path` needs to be an absolute path or `/`.
at Object.setFs (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-middleware\lib\Shared.js:88:11)
at Shared (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-middleware\lib\Shared.js:214:8)
at module.exports (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-middleware\middleware.js:22:15)
at new Server (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-server\lib\Server.js:56:20)
at startDevServer (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-server\bin\webpack-dev-server.js:379:12)
at processOptions (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-server\bin\webpack-dev-server.js:317:3)
at Object.<anonymous> (C:\Users\ankit\Desktop\r3\node_modules\webpack-dev-server\bin\webpack-dev-server.js:441:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! r3#1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the r3#1.0.0 start script 'webpack-dev-server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the r3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs r3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls r3
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ankit\Desktop\r3\npm-debug.log
The error message is clear: output.path needs to be an absolute path or /
Your output.path should write like this:
var path = require('path');
output: {
path: path.join( __dirname, './dist/'),
}
When I run "npm install", it runs successfully and it installs all the packages in node_module folder. However when I run "npm start" command in cmd then it gives following errors.
D:\INSM-HTML-Player>npm start
insm-player#1.0.0 start D:\INSM-HTML-Player
npm run build && npm run serve | npm run watch
insm-player#1.0.0 build D:\INSM-HTML-Player
rollup -c && concat-cli -f dist/main.js -o dist/all.js && npm run compress
resolve failed: { Error: Cannot find module 'npm-watch'
at Function.Module._resolveFilename (module.js:469:15)
at Function.requireRelative.resolve (D:\INSM-HTML-Player\node_modules\requir e-relative\index.js:30:17)
at resolve (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\seriali ze.js:25:26)
at findAndRemove (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\s erialize.js:67:11)
at D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:111:13 at Array.map (native)
at loadPreset (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:103:29)
at module.exports (D:\INSM-HTML-Player\node_modules\modify-babel-preset\inde x.js:97:19)
at Object.<anonymous> (D:\INSM-HTML-Player\node_modules\babel-preset-es2015-rollup\index.js:3:18)
at Module._compile (module.js:570:32) code: 'MODULE_NOT_FOUND' } npm-watch resolve failed: { Error: Cannot find module 'grunt-cli'
at Function.Module._resolveFilename (module.js:469:15)
at Function.requireRelative.resolve (D:\INSM-HTML-Player\node_modules\requir e-relative\index.js:30:17)
at resolve (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\seriali ze.js:25: at findAndRemove (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\s erialize.js:67:11)
at D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:111:13
at Array.map (native)
at loadPreset (D:\INSM-HTML-Player\node_modules\modify-babel-preset\lib\serialize.js:103:29)
at module.exports (D:\INSM-HTML-Player\node_modules\modify-babel-preset\index.js:97:19)
at Object.<anonymous> (D:\INSM-HTML-Player\node_modules\babel-preset-es2015-rollup\index.js:3:18)
at Module._compile (module.js:570:32) code: 'MODULE_NOT_FOUND' } gruntcli C:\Program Files\nodejs\node.exe D:\INSM-HTML-Player\node_modules\rollup\bin\rollup concat-cli -f string -o string
Options: -f, --files files or glob/wildcard to be matched and concatenated
[array] [required]
-o, --output the resulting file of the concatenation[string] [default: "all"]
--helpShow help [boolean]Examples: concat-cli -f *.js -o bundle.js This will concatenate all the js files in the current directory into a bundle.js Missing required argument: f
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe""C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm cli.js" "run" "build"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! insm-player#1.0.0 build: `rollup -c && concat-cli -f dist/main.js o dist/all.js && npm run compress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the insm-player#1.0.0 build script 'rollup -c && concat cli - f dist/main.js -o dist/all.js && npm run compress'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the insm-player package,
npm ERR! not with npm itself. npm ERR! Tell
the author that this fails on your system:
npm ERR! rollup -c &&
concat-cli -f dist/main.js -o dist/all.js && npm run c ompress npm
ERR! You can get information on how to open an issue for this project
with:
npm ERR! npm bugs insm-player npm ERR! Or if that isn't
available, you can get their info via: npm ERR! npm owner ls
insm-player
npm ERR! There is likely additional logging output
above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\INSM-HTML-Player\npm-debug.log
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "start" npm
ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE
npm ERR! insm-player#1.0.0 start: `npm run build && npm run serve |
npm run watch`
npm ERR! Exit status 1 npm ERR! npm ERR! Failed
at the insm-player#1.0.0 start script 'npm run build && npm run
serve | npm run watch'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the insm-player package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build && npm run serve | npm run watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs insm-player
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls insm-player
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\INSM-HTML-Player\npm-debug.log
You have to add the missing package npm-watch to package.json:
npm install npm-watch --save-dev
The run npm start again.
This may sound like a duplicate question, but, believe me, it's not. I couldn't find any source detailing the same error and how to remedy it:
C:\Users\admin\Desktop\nodejsfiles>npm install formidable
npm http GET https://registry.npmjs.org/formidable
npm ERR! Error: failed to fetch from registry: formidable
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\utils\npm-registry-
client\get.js:139:12
npm ERR! at cb (C:\Program Files\nodejs\node_modules\npm\lib\utils\npm-regis
try-client\request.js:32:9)
npm ERR! at Request._callback (C:\Program Files\nodejs\node_modules\npm\lib\
utils\npm-registry-client\request.js:137:18)
npm ERR! at Request.callback (C:\Program Files\nodejs\node_modules\npm\node_
modules\request\main.js:109:22)
npm ERR! at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\no
de_modules\request\main.js:198:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\
npm\node_modules\request\main.js:356:14)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1258:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "formidable"
npm ERR! cwd C:\Users\admin\Desktop\nodejsfiles
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: formidable
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\admin\Desktop\nodejsfiles\npm-debug.log
npm not ok
Seems like this works
npm config set registry http://registry.npmjs.org/
Quoted from "message failed to fetch from registry" while trying to install any module
Anyway I recommend updating to latest versions of nodejs and npm.