I'm running on a problem. My Laravel project is an old one, and I can't run npm run dev.
Let's see some code:
php artisan laravel --version: Laravel Framework 5.8.38
node --version: v16.16.0 This is the actual version of Node installed
And the error when running NPM:
MacBook-Pro-de-Marcello:webroker marcellopato$ npm run dev
npm WARN npm npm does not support Node.js v16.16.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/
> # dev /Users/marcellopato/Documents/Sites/webroker
> npm run development
npm WARN npm npm does not support Node.js v16.16.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/
> # development /Users/marcellopato/Documents/Sites/webroker
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
node:events:505
throw er; // Unhandled 'error' event
^
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn node_modules/webpack/bin/webpack.js',
path: 'node_modules/webpack/bin/webpack.js',
spawnargs: [
'--progress',
'--hide-modules',
'--config=node_modules/laravel-mix/setup/webpack.config.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
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! /Users/marcellopato/.npm/_logs/2022-08-29T14_40_33_577Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
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! /Users/marcellopato/.npm/_logs/2022-08-29T14_40_33_659Z-debug.log
The package.json:
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18.0",
"bootstrap": "^4.1.3",
"cross-env": "^5.2.0",
"jquery": "^3.2",
"laravel-mix": "^2.1.14",
"lodash": "^4.17.11",
"popper.js": "^1.14.3",
"vue": "^2.5.16",
"vuedraggable": "^2.16.0"
},
"dependencies": {
"#tinymce/tinymce-vue": "^1.1.0",
"#websanova/vue-upload": "^0.2.14-beta",
"ajv": "^6.5.4",
"jquery-filepond": "^1.0.0",
"laravel-echo": "^1.4.0",
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
"node-sass": "^4.9.4",
"npm": "^6.4.1",
"pusher-js": "^4.3.1",
"tinymce-vue-2": "0.0.5",
"v-calendar": "^0.9.7",
"vlightbox": "^2.0.2",
"vue-chat-scroll": "^1.2.0",
"vue-google-charts": "^0.3.2",
"vue-moment": "^4.0.0",
"vue-scrollto": "^2.13.0",
"vue-simple-lightbox": "^1.1.0",
"vue-template-compiler": "^2.5.17",
"vue-the-mask": "^0.11.1",
"vue-toasted": "^1.1.25",
"vue-upload-component": "^2.8.14",
"vue-wysiwyg": "^1.7.2",
"vue2-daterange-picker": "^0.1.1",
"vue2-dropzone": "^3.5.2",
"vue2-editor": "^2.6.1"
}
}
I think the issue is relative to the actual version of Node, that is too new. Could be that? And if so, there's a way to know what version I had installed on my machine at the time I was working on the project for the first time?
Or the issue is a new one?
Now there's the log file:
0 verbose cli /Users/marcellopato/.nvm/versions/node/v16.17.0/bin/node /Users/marcellopato/.nvm/versions/node/v16.17.0/bin/npm
1 info using npm#8.15.0
2 info using node#v16.17.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/Users/marcellopato/.nvm/versions/node/v16.17.0/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/marcellopato/Documents/Sites/webroker/.npmrc Completed in 0ms
10 timing config:load:project Completed in 19ms
11 timing config:load:file:/Users/marcellopato/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/Users/marcellopato/.nvm/versions/node/v16.17.0/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 33ms
19 timing npm:load:configload Completed in 33ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm install
23 verbose argv "install"
24 timing npm:load:setTitle Completed in 29ms
25 timing config:load:flatten Completed in 7ms
26 timing npm:load:display Completed in 11ms
27 verbose logfile logs-max:10 dir:/Users/marcellopato/.npm/_logs
28 verbose logfile /Users/marcellopato/.npm/_logs/2022-09-08T23_11_39_339Z-debug-0.log
29 timing npm:load:logFile Completed in 7ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 82ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile start cleaning logs, removing 18 files
35 timing idealTree:init Completed in 1856ms
36 warn old lockfile
36 warn old lockfile The package-lock.json file was created with an old version of npm,
36 warn old lockfile so supplemental metadata must be fetched from the registry.
36 warn old lockfile so supplemental metadata must be fetched from the registry.
36 warn old lockfile
36 warn old lockfile This is a one-time fix-up, please be patient...
36 warn old lockfile
37 silly inflate node_modules/#tinymce/tinymce-vue
38 silly inflate node_modules/#types/node
39 silly inflate node_modules/#types/semver
40 silly inflate node_modules/#websanova/vue-upload
41 silly logfile done cleaning log files
42 http fetch GET 200 https://registry.npmjs.org/#types%2fsemver 414ms (cache revalidated)
43 silly inflate node_modules/abbrev
44 http fetch GET 200 https://registry.npmjs.org/npm 2310ms (cache revalidated)
45 http fetch GET 200 https://registry.npmjs.org/abbrev 155ms (cache revalidated)
46 silly inflate node_modules/accepts
47 http fetch GET 200 https://registry.npmjs.org/#types%2fnode 579ms (cache updated)
48 silly inflate node_modules/acorn
49 http fetch GET 200 https://registry.npmjs.org/accepts 84ms (cache revalidated)
50 silly inflate node_modules/acorn-dynamic-import
51 http fetch GET 200 https://registry.npmjs.org/acorn 73ms (cache revalidated)
52 silly inflate node_modules/acorn-dynamic-import/node_modules/acorn
53 silly inflate node_modules/adjust-sourcemap-loader
54 http fetch GET 200 https://registry.npmjs.org/adjust-sourcemap-loader 62ms (cache revalidated)
55 silly inflate node_modules/adjust-sourcemap-loader/node_modules/camelcase
56 http fetch GET 200 https://registry.npmjs.org/camelcase 82ms (cache revalidated)
57 silly inflate node_modules/adjust-sourcemap-loader/node_modules/lodash.defaults
58 http fetch GET 200 https://registry.npmjs.org/lodash.defaults 59ms (cache revalidated)
59 silly inflate node_modules/adjust-sourcemap-loader/node_modules/lodash.defaults/node_modules/lodash.assign
60 http fetch GET 200 https://registry.npmjs.org/lodash.assign 63ms (cache revalidated)
61 silly inflate node_modules/ajv
62 http fetch GET 200 https://registry.npmjs.org/acorn-dynamic-import 328ms (cache revalidated)
63 silly inflate node_modules/ajv-keywords
64 http fetch GET 200 https://registry.npmjs.org/ajv 54ms (cache revalidated)
65 silly inflate node_modules/align-text
66 http fetch GET 200 https://registry.npmjs.org/ajv-keywords 51ms (cache revalidated)
67 silly inflate node_modules/align-text/node_modules/kind-of
68 http fetch GET 200 https://registry.npmjs.org/kind-of 48ms (cache revalidated)
69 silly inflate node_modules/alphanum-sort
70 http fetch GET 200 https://registry.npmjs.org/alphanum-sort 66ms (cache revalidated)
71 silly inflate node_modules/amdefine
72 http fetch GET 200 https://registry.npmjs.org/#tinymce%2ftinymce-vue 1189ms (cache revalidated)
73 silly inflate node_modules/ansi-html
74 http fetch GET 200 https://registry.npmjs.org/#websanova%2fvue-upload 1200ms (cache revalidated)
75 silly inflate node_modules/ansi-regex
76 http fetch GET 200 https://registry.npmjs.org/amdefine 48ms (cache revalidated)
77 silly inflate node_modules/ansi-styles
78 http fetch GET 200 https://registry.npmjs.org/ansi-html 54ms (cache revalidated)
79 silly inflate node_modules/anymatch
80 http fetch GET 200 https://registry.npmjs.org/ansi-regex 50ms (cache revalidated)
81 silly inflate node_modules/aproba
82 http fetch GET 200 https://registry.npmjs.org/ansi-styles 62ms (cache revalidated)
83 silly inflate node_modules/are-we-there-yet
84 http fetch GET 200 https://registry.npmjs.org/align-text 274ms (cache revalidated)
85 silly inflate node_modules/argparse
86 http fetch GET 200 https://registry.npmjs.org/anymatch 55ms (cache revalidated)
87 silly inflate node_modules/arr-diff
88 http fetch GET 200 https://registry.npmjs.org/aproba 52ms (cache revalidated)
89 silly inflate node_modules/arr-flatten
90 http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 79ms (cache revalidated)
91 silly inflate node_modules/arr-union
92 http fetch GET 200 https://registry.npmjs.org/argparse 70ms (cache revalidated)
93 silly inflate node_modules/array-find-index
94 http fetch GET 200 https://registry.npmjs.org/arr-diff 66ms (cache revalidated)
95 silly inflate node_modules/array-flatten
96 http fetch GET 200 https://registry.npmjs.org/arr-flatten 66ms (cache revalidated)
97 silly inflate node_modules/array-includes
98 http fetch GET 200 https://registry.npmjs.org/array-find-index 77ms (cache revalidated)
99 silly inflate node_modules/array-union
100 http fetch GET 200 https://registry.npmjs.org/array-flatten 73ms (cache revalidated)
101 silly inflate node_modules/array-uniq
102 http fetch GET 200 https://registry.npmjs.org/arr-union 102ms (cache revalidated)
103 silly inflate node_modules/array-unique
104 http fetch GET 200 https://registry.npmjs.org/array-includes 90ms (cache revalidated)
105 silly inflate node_modules/asn1
106 http fetch GET 200 https://registry.npmjs.org/array-union 108ms (cache revalidated)
107 silly inflate node_modules/asn1.js
108 http fetch GET 200 https://registry.npmjs.org/array-uniq 106ms (cache revalidated)
109 silly inflate node_modules/assert
110 http fetch GET 200 https://registry.npmjs.org/array-unique 93ms (cache revalidated)
Probably your current npm is incompatible with the node version.
I advise you to reinstall npm and then install the node again.
Delete npm
Mac:
sudo npm uninstall -g npm
Windows:
npm uninstall -g npm
Install node.js
https://nodejs.org
Related
when installing tailwind I get the following error:
admin#admin-VirtualBox:~/Desktop/Code/react_app/client$ npm install -D tailwindcss postcss autoprefixer
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-app#1.0
npm ERR! Found: autoprefixer#9.7.1
npm ERR! node_modules/autoprefixer
npm ERR! autoprefixer#"^9.6.1" from postcss-preset-env#6.7.0
npm ERR! node_modules/postcss-preset-env
npm ERR! postcss-preset-env#"6.7.0" from react-scripts#3.2.0
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"3.2.0" from the root project
npm ERR! dev autoprefixer#"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev autoprefixer#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: postcss#8.4.13
npm ERR! node_modules/postcss
npm ERR! peer postcss#"^8.1.0" from autoprefixer#10.4.7
npm ERR! node_modules/autoprefixer
npm ERR! dev autoprefixer#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/admin/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/admin/.npm/_logs/2022-05-17T19_33_57_115Z-debug-0.log
I am using the following package.json file:
{
"name": "react-app",
"version": "1.0",
"private": true,
"dependencies": {
"babel-eslint": "10.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^6.3.0",
"react-scripts": "3.2.0",
"web3": "^1.6.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
This is the fill log:
0 verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'install',
0 verbose cli '-D',
0 verbose cli 'tailwindcss',
0 verbose cli 'postcss',
0 verbose cli 'autoprefixer'
0 verbose cli ]
1 info using npm#8.5.5
2 info using node#v16.15.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 8ms
6 timing config:load:builtin Completed in 8ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/home/admin/Desktop/Code/react_app/client/.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/home/admin/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 14ms
19 timing npm:load:configload Completed in 14ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:display Completed in 3ms
23 verbose logfile /home/admin/.npm/_logs/2022-05-17T19_33_57_115Z-debug-0.log
24 timing npm:load:logFile Completed in 2ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 19ms
28 timing arborist:ctor Completed in 1ms
29 silly logfile start cleaning logs, removing 1 files
30 timing idealTree:init Completed in 769ms
31 timing idealTree:userRequests Completed in 1ms
32 silly idealTree buildDeps
33 silly fetch manifest tailwindcss#*
34 timing arborist:ctor Completed in 0ms
35 http fetch GET 200 https://registry.npmjs.org/tailwindcss 796ms (cache hit)
36 silly fetch manifest postcss#*
37 http fetch GET 200 https://registry.npmjs.org/postcss 8ms (cache hit)
38 silly fetch manifest autoprefixer#*
39 http fetch GET 200 https://registry.npmjs.org/autoprefixer 5ms (cache hit)
40 timing idealTree Completed in 1610ms
41 timing command:install Completed in 1615ms
42 verbose stack Error: could not resolve
42 verbose stack at PlaceDep.failPeerConflict (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/place-dep.js:546:25)
42 verbose stack at PlaceDep.place (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/place-dep.js:197:21)
42 verbose stack at new PlaceDep (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/place-dep.js:71:10)
42 verbose stack at /usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:964:31
42 verbose stack at Array.map (<anonymous>)
42 verbose stack at Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:964:8)
42 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:216:7)
42 verbose stack at async Promise.all (index 1)
42 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:153:5)
42 verbose stack at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:159:5)
43 verbose cwd /home/admin/Desktop/Code/react_app/client
44 verbose Linux 5.13.0-40-generic
45 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-D" "tailwindcss" "postcss" "autoprefixer"
46 verbose node v16.15.0
47 verbose npm v8.5.5
48 error code ERESOLVE
49 error ERESOLVE could not resolve
50 error
51 error While resolving: [1mreact-app[22m#[1m1.0[22m
51 error Found: [1mautoprefixer[22m#[1m9.7.1[22m[2m[22m
51 error [2mnode_modules/autoprefixer[22m
51 error [1mautoprefixer[22m#"[1m^9.6.1[22m" from [1mpostcss-preset-env[22m#[1m6.7.0[22m[2m[22m
51 error [2mnode_modules/postcss-preset-env[22m
51 error [1mpostcss-preset-env[22m#"[1m6.7.0[22m" from [1mreact-scripts[22m#[1m3.2.0[22m[2m[22m
51 error [2mnode_modules/react-scripts[22m
51 error [1mreact-scripts[22m#"[1m3.2.0[22m" from the root project
51 error [33mdev[39m [1mautoprefixer[22m#"[1m*[22m" from the root project
51 error
51 error Could not resolve dependency:
51 error [33mdev[39m [1mautoprefixer[22m#"[1m*[22m" from the root project
51 error
51 error Conflicting peer dependency: [1mpostcss[22m#[1m8.4.13[22m[2m[22m
51 error [2mnode_modules/postcss[22m
51 error [35mpeer[39m [1mpostcss[22m#"[1m^8.1.0[22m" from [1mautoprefixer[22m#[1m10.4.7[22m[2m[22m
51 error [2mnode_modules/autoprefixer[22m
51 error [33mdev[39m [1mautoprefixer[22m#"[1m*[22m" from the root project
51 error
51 error Fix the upstream dependency conflict, or retry
51 error this command with --force, or --legacy-peer-deps
51 error to accept an incorrect (and potentially broken) dependency resolution.
51 error
51 error See /home/admin/.npm/eresolve-report.txt for a full report.
52 verbose exit 1
53 timing npm Completed in 1755ms
54 verbose unfinished npm timer reify 1652816037244
55 verbose unfinished npm timer reify:loadTrees 1652816037246
56 verbose unfinished npm timer idealTree:buildDeps 1652816038016
57 verbose unfinished npm timer idealTree:#root 1652816038016
58 verbose code 1
59 error A complete log of this run can be found in:
59 error /home/admin/.npm/_logs/2022-05-17T19_33_57_115Z-debug-0.log
Any suggestions what I am doing wrong?
I appreciate your replies!
Your problem lies in using multiple conflicting versions of autoprefixer. Those come from different packages, for instance react-scripts. I noticed that, while your react is pretty up-to-date, your react-scripts are two major versions behind (3.2.0 vs. 5.0.1). This means there have been two times breaking changes in between, which could easily explain the conflict. If you aren't sure what that means, head over to Semver for an explanation.
I can't possibly tell if this is going to resolve the problem, but I would make a quick copy of the project, remove all dependencies from package.json and run npm i babel-eslint react react-dom react-router react-scripts web3. There are more sophisticated ways to do this, but this would quickly tell you, if updating all packages fixes the problem.
I am trying to install react-tinder-card in my current project.So i am tring to install the react-tinder-card but after i use the command
npm install --save react-tinder-card
All i can see in my console is:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tinder-clone#0.1.0
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! react#"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0" from react-tinder-card#1.3.1
npm ERR! node_modules/react-tinder-card
npm ERR! react-tinder-card#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/nero/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nero/.npm/_logs/2020-11-06T16_36_39_957Z-debug.log
When i opened the debug.log file, i found this:
0 verbose cli [
0 verbose cli '/usr/bin/node',
0 verbose cli '/usr/bin/npm',
0 verbose cli 'install',
0 verbose cli '--save',
0 verbose cli 'react-tinder-card'
0 verbose cli ]
1 info using npm#7.0.3
2 info using node#v15.0.1
3 timing config:load:defaults Completed in 3ms
4 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 0ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 3ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/home/nero/Documents/MERN/tinder-clone/.npmrc Completed in 1ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:/home/nero/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 12ms
19 verbose npm-session b46c4469ef66a9f2
20 timing npm:load Completed in 19ms
21 timing arborist:ctor Completed in 0ms
22 timing idealTree:init Completed in 1413ms
23 timing idealTree:userRequests Completed in 3ms
24 silly idealTree buildDeps
25 silly fetch manifest react-tinder-card#*
26 http fetch GET 200 https://registry.npmjs.org/react-tinder-card 188ms (from cache)
27 silly fetch manifest react#^17.0.1
28 timing arborist:ctor Completed in 0ms
29 http fetch GET 304 https://registry.npmjs.org/react 1196ms (from cache)
30 timing idealTree Completed in 2812ms
31 timing command:install Completed in 2815ms
32 verbose stack Error: unable to resolve dependency tree
32 verbose stack at Arborist.[failPeerConflict] (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:1011:25)
32 verbose stack at Arborist.[loadPeerSet] (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:991:36)
32 verbose stack at async Arborist.[buildDepStep] (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:760:11)
32 verbose stack at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:202:7)
32 verbose stack at async Promise.all (index 1)
32 verbose stack at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:121:5)
32 verbose stack at async install (/usr/lib/node_modules/npm/lib/install.js:40:5)
33 verbose cwd /home/nero/Documents/MERN/tinder-clone
34 verbose Linux 5.4.0-52-generic
35 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--save" "react-tinder-card"
36 verbose node v15.0.1
37 verbose npm v7.0.3
38 error code ERESOLVE
39 error ERESOLVE unable to resolve dependency tree
40 error
41 error While resolving: [1mtinder-clone[22m#[1m0.1.0[22m
41 error Found: [1mreact[22m#[1m17.0.1[22m[2m[22m
41 error [2mnode_modules/react[22m
41 error [1mreact[22m#"[1m^17.0.1[22m" from the root project
41 error
41 error Could not resolve dependency:
41 error [35mpeer[39m [1mreact[22m#"[1m^16.8.0[22m" from [1mreact-tinder-card[22m#[1m1.3.1[22m[2m[22m
41 error [2mnode_modules/react-tinder-card[22m
41 error [1mreact-tinder-card[22m#"[1m*[22m" from the root project
41 error
41 error Fix the upstream dependency conflict, or retry
41 error this command with --force, or --legacy-peer-deps
41 error to accept an incorrect (and potentially broken) dependency resolution.
41 error
41 error See /home/nero/.npm/eresolve-report.txt for a full report.
42 verbose exit 1
I don't understand what that means. Please help me find the solution.Any sort of help would be appreciated.
Thank you in advance.
$ npm install --save react-tinder-card --legacy-peer-deps
This error comes from version 7.x of npm.
Please try again with the --legacy-peer-deps option.
What this error basically says is that react-tinder-card#1.3.1 in it's peer dependencies has react#"^16.8.0". So it needs that version of react to function properly. On your tinder-clone#0.1.0 application you currently have react#17.0.1.
This problem can be solved manually by just installing version of react that react-tinder-card#1.3.1 needs which is react#"^16.8.0", so you need to downgrade your version to run the package.
The --legacy-peer-deps flag was introduced with v7 of npm as a way to bypass peerDependency auto-installation; it tells NPM to ignore peer deps and proceed with the installation anyway. This can cause some unwanted behavior and I would not suggest it.
Downgrade to npm v6. It should fix the issue.
npm install -g npm#6
This happens when you are trying to clone a project which is built a long time ago, and project dependencies have moved on to newer versions.
Just run below code. Works fine for me every time. You should also see this solution with the error.
npm install --legacy-peer-deps
https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/
The react-apollo package has been deprecated, and the functionality offered by each of the above packages can now be accessed from #apollo/client directly:
#apollo/react-hooks -> now available directly from #apollo/client
#apollo/react-components -> now available from #apollo/client/react/components
#apollo/react-hoc -> now available from #apollo/client/react/hoc
#apollo/react-ssr -> now available from #apollo/client/react/ssr
#apollo/react-testing -> now available from #apollo/client/testing
I had the same error above. I installed npm v6.7. I reinstalled Netlify CMS and Gatsby:
npm install netlify-cms-app#2.9 gatsby-plugin-netlify-cms#^4.0.0
I don't have anything under the static folder except a favicon.ico file. No admin folder and no .yml file.
Downgrading the npm version to version 6 helped me resolve the issue.
Upgrade to npm v8. It should fix the issue.
npm install -g npm#8
since using --legacy-peer-deps flag wont install the dev-dependencies your react version, use --force instead.
trying to install a forked version of ng2-smart-table for my app but npm is not doing it.
I've used
npm install git+http://github.com/myusername/ng2-smart-table.git
npm install git://github.com/myusername/ng2-smart-table.git
npm install github.com/myusername/ng2-smart-table
and many other variations. I get the following error.
npm ERR! addLocal Could not install /tmp/npm-24904-e690204a/git-cache-97763c70/bb5d603024d75ce8a664d949a646ca7c7c29b0a0
npm ERR! Linux 3.10.0-693.5.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "git://github.com/myusername/ng2-smart-table.git"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/myname/my-app/npm-debug.log
[root#stackc-pre-staging my-app]# vim /home/myname/my-app/npm-debug.log
[root#stackc-pre-staging my-app]# npm install git+http://github.com/myusername/ng2-smart-table.git
npm ERR! addLocal Could not install /tmp/npm-25075-02c22b92/git-cache-ba6c0ee9/bb5d603024d75ce8a664d949a646ca7c7c29b0a0
npm ERR! Linux 3.10.0-693.5.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "git+http://github.com/myusername/ng2-smart-table.git"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/myname/my-app/npm-debug.log
Contents of /home/myname/my-app/npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'install',
1 verbose cli 'git+http://github.com/myusername/ng2-smart-table.git' ]
2 info using npm#3.10.10
3 info using node#v6.11.1
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData git+http://github.com/myusername/ng2-smart-table.git
8 silly fetchOtherPackageData git+http://github.com/myusername/ng2-smart-table.git
9 silly cache add args [ 'git+http://github.com/myusername/ng2-smart-table.git', null ]
10 verbose cache add spec git+http://github.com/myusername/ng2-smart-table.git
11 silly cache add parsed spec Result {
11 silly cache add raw: 'git+http://github.com/myusername/ng2-smart-table.git',
11 silly cache add scope: null,
11 silly cache add escapedName: null,
11 silly cache add name: null,
11 silly cache add rawSpec: 'git+http://github.com/myusername/ng2-smart-table.git',
11 silly cache add spec: 'http://github.com/myusername/ng2-smart-table.git',
11 silly cache add type: 'git' }
12 verbose addRemoteGit caching git+http://github.com/myusername/ng2-smart-table.git
13 silly tryClone cloning git+http://github.com/myusername/ng2-smart-table.git via git+http://github.com/myusername/ng2-smart-table.git
14 verbose tryClone git-http-github-com-myusername-ng2-smart-table-git-6513bc33 not in flight; caching
15 verbose correctMkdir /root/.npm/_git-remotes correctMkdir not in flight; initializing
16 info git [ 'clone',
16 info git '--template=/root/.npm/_git-remotes/_templates',
16 info git '--mirror',
16 info git 'http://github.com/myusername/ng2-smart-table.git',
16 info git '/root/.npm/_git-remotes/git-http-github-com-myusername-ng2-smart-table-git-6513bc33' ]
17 verbose mirrorRemote git+http://github.com/myusername/ng2-smart-table.git git clone http://github.com/myusername/ng2-smart-table.git Cloning into bare repository '/root/.npm/_git-remotes/git-http-github-com-myusername-ng2-smart-table-git-6513bc33'...
18 verbose correctMkdir /root/.npm/_git-remotes correctMkdir not in flight; initializing
19 verbose setPermissions git+http://github.com/myusername/ng2-smart-table.git set permissions on /root/.npm/_git-remotes/git-http-github-com-myusername-ng2-smart-table-git-6513bc33
20 verbose resolveHead git+http://github.com/myusername/ng2-smart-table.git original treeish: master
21 info git [ 'rev-list', '-n1', 'master' ]
22 silly resolveHead git+http://github.com/myusername/ng2-smart-table.git resolved treeish: bb5d603024d75ce8a664d949a646ca7c7c29b0a0
23 verbose resolveHead git+http://github.com/myusername/ng2-smart-table.git resolved Git URL: git+ssh://git#github.com/myusername/ng2-smart-table.git#bb5d603024d75ce8a664d949a646ca7c7c29b0a0
24 silly resolveHead Git working directory: /tmp/npm-25075-02c22b92/git-cache-ba6c0ee9/bb5d603024d75ce8a664d949a646ca7c7c29b0a0
25 info git [ 'clone',
25 info git '/root/.npm/_git-remotes/git-http-github-com-myusername-ng2-smart-table-git-6513bc33',
25 info git '/tmp/npm-25075-02c22b92/git-cache-ba6c0ee9/bb5d603024d75ce8a664d949a646ca7c7c29b0a0' ]
26 verbose cloneResolved git+http://github.com/myusername/ng2-smart-table.git clone Cloning into '/tmp/npm-25075-02c22b92/git-cache-ba6c0ee9/bb5d603024d75ce8a664d949a646ca7c7c29b0a0'...
26 verbose cloneResolved done.
27 info git [ 'checkout', 'bb5d603024d75ce8a664d949a646ca7c7c29b0a0' ]
28 verbose checkoutTreeish git+http://github.com/myusername/ng2-smart-table.git checkout Note: checking out 'bb5d603024d75ce8a664d949a646ca7c7c29b0a0'.
28 verbose checkoutTreeish
28 verbose checkoutTreeish You are in 'detached HEAD' state. You can look around, make experimental
28 verbose checkoutTreeish changes and commit them, and you can discard any commits you make in this
28 verbose checkoutTreeish state without impacting any branches by performing another checkout.
28 verbose checkoutTreeish
28 verbose checkoutTreeish If you want to create a new branch to retain commits you create, you may
28 verbose checkoutTreeish do so (now or later) by using -b with the checkout command again. Example:
28 verbose checkoutTreeish
28 verbose checkoutTreeish git checkout -b new_branch_name
28 verbose checkoutTreeish
28 verbose checkoutTreeish HEAD is now at bb5d603... Added a show/hide variable to column settings so that you can toggle visibility of columns
29 info git [ 'submodule', '-q', 'update', '--init', '--recursive' ]
30 verbose updateSubmodules git+http://github.com/myusername/ng2-smart-table.git submodule update
31 error addLocal Could not install /tmp/npm-25075-02c22b92/git-cache-ba6c0ee9/bb5d603024d75ce8a664d949a646ca7c7c29b0a0
32 silly fetchPackageMetaData Error: No version provided in package.json
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/lib/cache/add-local.js:73:17
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:356:5
32 silly fetchPackageMetaData at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:320:45)
32 silly fetchPackageMetaData at final (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:354:3)
32 silly fetchPackageMetaData at then (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:124:5)
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:243:12
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/node_modules.bundled/graceful-fs/graceful-fs.js:78:16
32 silly fetchPackageMetaData at tryToString (fs.js:456:3)
32 silly fetchPackageMetaData at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:443:12)
32 silly fetchPackageMetaData error for git+http://github.com/myusername/ng2-smart-table.git Error: No version provided in package.json
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/lib/cache/add-local.js:73:17
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:356:5
32 silly fetchPackageMetaData at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:320:45)
32 silly fetchPackageMetaData at final (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:354:3)
32 silly fetchPackageMetaData at then (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:124:5)
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:243:12
32 silly fetchPackageMetaData at /usr/lib/node_modules/npm/node_modules.bundled/graceful-fs/graceful-fs.js:78:16
32 silly fetchPackageMetaData at tryToString (fs.js:456:3)
32 silly fetchPackageMetaData at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:443:12)
33 silly rollbackFailedOptional Starting
34 silly rollbackFailedOptional Finishing
35 silly runTopLevelLifecycles Finishing
36 silly install printInstalled
37 verbose stack Error: No version provided in package.json
37 verbose stack at /usr/lib/node_modules/npm/lib/cache/add-local.js:73:17
37 verbose stack at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:356:5
37 verbose stack at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:320:45)
37 verbose stack at final (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:354:3)
37 verbose stack at then (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:124:5)
37 verbose stack at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:243:12
37 verbose stack at /usr/lib/node_modules/npm/node_modules.bundled/graceful-fs/graceful-fs.js:78:16
37 verbose stack at tryToString (fs.js:456:3)
37 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:443:12)
38 verbose cwd /home/myname/my-app
39 error Linux 3.10.0-693.5.2.el7.x86_64
40 error argv "/usr/bin/node" "/usr/bin/npm" "install" "git+http://github.com/myusername/ng2-smart-table.git"
41 error node v6.11.1
42 error npm v3.10.10
43 error No version provided in package.json
44 error If you need help, you may report this error at:
44 error <https://github.com/npm/npm/issues>
45 verbose exit [ 1, true ]
Is this a permissions issue? Or is there something wrong with the way npm is set up? Any help would be appreciated.
Try recreating package.json for that repo with npm init . command and go through all the steps.
Remember having correct repository link in the repository section.
I had the same problem but above helped.
Problem 1: The repo on your post does not exist.
You might've used the wrong repo url.
Use the correct repo url: https://github.com/akveo/ng2-smart-table
Problem 2: The repo does not have a version specified in the package.json
Just fork it and add a version in the package.json file.
Or, use the npm version,
npm install --save ng2-smart-table
I'm following this and try to use pdf.js. I've downloaded and extracted the library and now I was trying to install gulp globally as it says on the page but when I run the command
C:\Users\xx\Desktop\pdfSearch2>npm install -g gulp-cli
I get errors:
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" "install" "-g"
"gulp-cli"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! unable to get local issuer certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\xx\Desktop\pdfSearch2\npm-debug.log
And here is the full npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'gulp-cli' ]
2 info using npm#3.10.8
3 info using node#v6.9.1
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData gulp-cli
8 silly fetchNamedPackageData gulp-cli
9 silly mapToRegistry name gulp-cli
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'gulp-cli',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: 'gulp-cli',
12 silly mapToRegistry name: 'gulp-cli',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/gulp-cli
14 verbose request uri https://registry.npmjs.org/gulp-cli
15 verbose request no auth needed
16 info attempt registry request try #1 at 8:39:43 AM
17 verbose request id d0dd4dbe0b1dc495
18 http request GET https://registry.npmjs.org/gulp-cli
19 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
20 info attempt registry request try #2 at 8:39:53 AM
21 http request GET https://registry.npmjs.org/gulp-cli
22 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
23 info attempt registry request try #3 at 8:40:53 AM
24 http request GET https://registry.npmjs.org/gulp-cli
25 silly fetchPackageMetaData Error: unable to get local issuer certificate
25 silly fetchPackageMetaData at Error (native)
25 silly fetchPackageMetaData at TLSSocket.<anonymous> (_tls_wrap.js:1062:38)
25 silly fetchPackageMetaData at emitNone (events.js:86:13)
25 silly fetchPackageMetaData at TLSSocket.emit (events.js:185:7)
25 silly fetchPackageMetaData at TLSSocket._finishInit (_tls_wrap.js:586:8)
25 silly fetchPackageMetaData at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)
25 silly fetchPackageMetaData error for gulp-cli { Error: unable to get local issuer certificate
25 silly fetchPackageMetaData at Error (native)
25 silly fetchPackageMetaData at TLSSocket.<anonymous> (_tls_wrap.js:1062:38)
25 silly fetchPackageMetaData at emitNone (events.js:86:13)
25 silly fetchPackageMetaData at TLSSocket.emit (events.js:185:7)
25 silly fetchPackageMetaData at TLSSocket._finishInit (_tls_wrap.js:586:8)
25 silly fetchPackageMetaData at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38) code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' }
26 silly rollbackFailedOptional Starting
27 silly rollbackFailedOptional Finishing
28 silly runTopLevelLifecycles Finishing
29 silly install printInstalled
30 verbose stack Error: unable to get local issuer certificate
30 verbose stack at Error (native)
30 verbose stack at TLSSocket.<anonymous> (_tls_wrap.js:1062:38)
30 verbose stack at emitNone (events.js:86:13)
30 verbose stack at TLSSocket.emit (events.js:185:7)
30 verbose stack at TLSSocket._finishInit (_tls_wrap.js:586:8)
30 verbose stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)
31 verbose cwd C:\Users\xx\Desktop\pdfSearch2
32 error Windows_NT 6.1.7601
33 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "gulp-cli"
34 error node v6.9.1
35 error npm v3.10.8
36 error code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
37 error unable to get local issuer certificate
38 error If you need help, you may report this error at:
38 error <https://github.com/npm/npm/issues>
39 verbose exit [ 1, true ]
Any idea what I'm doing wrong?
thanks
EDIT: so running this C:\Users\antoniob\Desktop\pdfSearch2>npm config set strict-ssl=false has worked but now I don't seem to be able to install the pdf.js dependencies:
C:\Users\xx\Desktop\pdfSearch2>npm install
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\xx\Desktop\pdfSearch2\package.json'
npm WARN pdfSearch2 No description
npm WARN pdfSearch2 No repository field.
npm WARN pdfSearch2 No README data
npm WARN pdfSearch2 No license field.
I have faced thit issue recently, it can be caused by different reasons.
But usually, it is firewall or proxy behind which is your network that cause this error.
My solution was npm config set strict-ssl=false command which cancels check of the SSL certificates by npm. But be warned that this solution is insecure, it is better to configure your firewall or proxy properly. So after packages installing run npm config set strict-ssl=true command.
i have node v.0.10.30 and npm 1.4.21 installed,
when i execute this command
npm install express
i get this as a result
Error: shasum check failed for /tmp/npm-4273-g1Rb0gCE/registry.npmjs.org/express/- /express-4.9.7.tgz
npm ERR! Expected: ae3e0bdf0095749467fde125afd77e7988ff0fbb
npm ERR! Actual: da39a3ee5e6b4b0d3255bfef95601890afd80709
npm ERR! From: https://registry.npmjs.org/express/-/express-4.9.7.tgz
npm ERR! at /usr/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream.<anonymous>(/usr/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.emit (events.js:117:20)
npm ERR! at _stream_readable.js:938:16
npm ERR! at process._tickCallback (node.js:419:13)
more log from npm-debug.log file
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'express' ]
2 info using npm#1.4.21
3 info using node#v0.10.30
4 verbose node symlink /usr/bin/node
5 warn package.json app#0.0.0 No description
6 warn package.json app#0.0.0 No repository field.
7 warn package.json app#0.0.0 No README data
8 verbose readDependencies using package.json deps
9 verbose cache add [ 'express', null ]
19 verbose lock express# /home/wilson/.npm/64a534c1-express.lock
20 silly addNameRange { name: 'express', range: '*', hasData: false }
21 verbose request where is /express
22 verbose request registry https://registry.npmjs.org/
23 verbose request id a071fcd68daa94eb
24 verbose url raw /express
25 verbose url resolving [ 'https://registry.npmjs.org/', './express' ]
26 verbose url resolved https://registry.npmjs.org/express
27 verbose request where is https://registry.npmjs.org/express
28 info trying registry request attempt 1 at 20:00:01
29 verbose etag "7FVLRT9Y9RQJKGVQC7099FKQ4"
30 http GET https://registry.npmjs.org/express
31 http 304 https://registry.npmjs.org/express
32 silly registry.get cb [ 304,
32 silly registry.get { date: 'Sat, 11 Oct 2014 00:00:01 GMT',
32 silly registry.get server: 'Apache',
32 silly registry.get via: '1.1 varnish',
32 silly registry.get 'last-modified': 'Fri, 10 Oct 2014 23:59:57 GMT',
32 silly registry.get 'cache-control': 'max-age=60',
32 silly registry.get etag: '"7FVLRT9Y9RQJKGVQC7099FKQ4"',
32 silly registry.get 'x-served-by': 'cache-iad2130-IAD',
32 silly registry.get 'x-cache': 'HIT',
32 silly registry.get 'x-cache-hits': '2',
32 silly registry.get 'x-timer': 'S1412985601.881420,VS0,VE0',
32 silly registry.get vary: 'Accept',
32 silly registry.get 'content-length': '0',
32 silly registry.get 'keep-alive': 'timeout=10, max=50',
32 silly registry.get connection: 'Keep-Alive' } ]
33 verbose etag https://registry.npmjs.org/express from cache
34 silly addNameRange number 2 { name: 'express', range: '*', hasData: true }
my os is ubuntu 14.04
npm command recommended me to report this log at npm's github repository
download the file https://registry.npmjs.org/express/-/express-4.9.7.tgz
then install from the file
npm install ./express-4.9.7.tgz
Some of these error messages will typically come up when you are not accessing the root admin of the system while executing the install.
When I opened the terminal and ran $ sudo -i to access the #root and then entered $ npm install express , it was installed correctly. Hopefully this helps!
I had a similar issue which was caused by a corrupt download.
It was easily solved by purging the offending package from the cache and re-running the installation.
$ npm cache clean express
$ npm i express
(in my case the corrupt package was a dependency, so I purged it from cache, and not the package that I was trying to install, of course)
First start command prompt as an administrator then run your command.