If I try to install a package this is the error
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-04-22T16_39_41_735Z-debug.log
And the File content is:
0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'i', 'htop' ]
1 info using npm#7.7.6
2 info using node#v15.14.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/root/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setEnvs Completed in 0ms
17 timing config:load Completed in 6ms
18 timing npm:load:configload Completed in 6ms
19 timing npm:load:setTitle Completed in 0ms
20 timing npm:load:setupLog Completed in 1ms
21 timing npm:load:cleanupLog Completed in 2ms
22 timing npm:load:configScope Completed in 0ms
23 timing npm:load:projectScope Completed in 0ms
24 timing npm:load Completed in 13ms
25 timing config:load:flatten Completed in 3ms
26 timing arborist:ctor Completed in 1ms
27 timing idealTree:init Completed in 225ms
28 timing idealTree:userRequests Completed in 1ms
29 silly idealTree buildDeps
30 timing idealTree Completed in 228ms
31 timing command:install Completed in 238ms
32 verbose stack Error: Tracker "idealTree" already exists
32 verbose stack at Arborist.[_onError] (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/tracker.js:101:11)
32 verbose stack at Arborist.addTracker (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/tracker.js:28:21)
32 verbose stack at Arborist.[buildDeps] (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:692:10)
32 verbose stack at Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:209:29)
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:131:5)
32 verbose stack at async Install.install (/usr/lib/node_modules/npm/lib/install.js:137:5)
33 verbose cwd /root
34 verbose Linux 4.19.0-16-amd64
35 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "htop"
36 verbose node v15.14.0
37 verbose npm v7.7.6
38 error Tracker "idealTree" already exists
39 verbose exit 1
Related
I'm trying to get in to reactjs first I install the create-react-app using npm and once I run the create-react-app command it was throwing me the following error
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'install',
0 verbose cli '-g',
0 verbose cli 'yarn'
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:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users\Thilina\.npmrc Completed in 0ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:C:\Users\Thilina\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 14ms
18 timing npm:load:configload Completed in 15ms
19 timing npm:load:setTitle Completed in 0ms
20 timing config:load:flatten Completed in 3ms
21 timing npm:load:display Completed in 5ms
22 verbose logfile C:\Users\Thilina\AppData\Local\npm-cache\_logs\2022-05-30T07_44_49_903Z-debug-0.log
23 timing npm:load:logFile Completed in 7ms
24 timing npm:load:timers Completed in 0ms
25 timing npm:load:configScope Completed in 0ms
26 timing npm:load Completed in 27ms
27 timing arborist:ctor Completed in 0ms
28 silly logfile start cleaning logs, removing 2 files
29 timing idealTree:init Completed in 6ms
30 timing idealTree:userRequests Completed in 2ms
31 silly idealTree buildDeps
32 silly fetch manifest yarn#*
33 http fetch GET 200 https://registry.npmjs.org/yarn 874ms (cache miss)
34 silly placeDep ROOT yarn#1.22.18 OK for: want: *
35 timing idealTree:#root Completed in 887ms
36 timing idealTree:node_modules/yarn Completed in 0ms
37 timing idealTree:buildDeps Completed in 888ms
38 timing idealTree:fixDepFlags Completed in 0ms
39 timing idealTree Completed in 899ms
40 timing reify:loadTrees Completed in 901ms
41 timing reify:diffTrees Completed in 1ms
42 silly reify moves {}
43 timing reify:retireShallow Completed in 0ms
44 timing reify:createSparse Completed in 1ms
45 timing reify:loadBundles Completed in 0ms
46 silly audit bulk request { yarn: [ '1.22.18' ] }
47 silly tarball no local data for yarn#https://registry.npmjs.org/yarn/-/yarn-1.22.18.tgz. Extracting by manifest.
48 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 445ms
49 timing auditReport:getReport Completed in 446ms
50 silly audit report {}
51 timing auditReport:init Completed in 0ms
52 timing reify:audit Completed in 446ms
53 http fetch GET 200 https://registry.npmjs.org/yarn/-/yarn-1.22.18.tgz 3096ms (cache miss)
54 timing reifyNode:node_modules/yarn Completed in 3103ms
55 timing reify:unpack Completed in 3104ms
56 timing reify:unretire Completed in 0ms
57 timing build:queue Completed in 5ms
58 info run yarn#1.22.18 preinstall node_modules/yarn :; (node ./preinstall.js > /dev/null 2>&1 || true)
59 info run yarn#1.22.18 preinstall { code: 1, signal: null }
60 timing reify:rollback:createSparse Completed in 6ms
61 timing reify:rollback:retireShallow Completed in 0ms
62 timing command:install Completed in 8818ms
63 verbose stack Error: command failed
63 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
63 verbose stack at ChildProcess.emit (node:events:527:28)
63 verbose stack at maybeClose (node:internal/child_process:1092:16)
63 verbose stack at Socket.<anonymous> (node:internal/child_process:451:11)
63 verbose stack at Socket.emit (node:events:527:28)
63 verbose stack at Pipe.<anonymous> (node:net:709:12)
64 verbose pkgid yarn#1.22.18
65 verbose cwd F:\ReactNative\React\ReactWithMosh
66 verbose Windows_NT 10.0.19042
67 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yarn"
68 verbose node v16.15.0
69 verbose npm v8.5.5
70 error code 1
71 error path C:\Users\Thilina\AppData\Roaming\npm\node_modules\yarn
72 error command failed
73 error command bash -c :; (node ./preinstall.js > /dev/null 2>&1 || true)
74 verbose exit 1
75 timing npm Completed in 9221ms
76 verbose unfinished npm timer reify 1653896690302
77 verbose unfinished npm timer reify:build 1653896694324
78 verbose unfinished npm timer build 1653896694324
79 verbose unfinished npm timer build:deps 1653896694324
80 verbose unfinished npm timer build:run:preinstall 1653896694329
81 verbose unfinished npm timer build:run:preinstall:node_modules/yarn 1653896694330
82 verbose code 1
83 error A complete log of this run can be found in:
83 error C:\Users\Thilina\AppData\Local\npm-cache\_logs\2022-05-30T07_44_49_903Z-debug-0.log
So, I searched the internet and found that there's a temporary workaround using installing yarn
so, I tried to install yarn and I ran the following command
npm install -g yarn
and I get the following error
Any help would be highly appreciated
I've tried cleaning cache using -force but still won't work.
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'install',
0 verbose cli '-g',
0 verbose cli 'yarn'
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:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users\Thilina\.npmrc Completed in 0ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:C:\Users\Thilina\AppData\Roaming\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 14ms
18 timing npm:load:configload Completed in 15ms
19 timing npm:load:setTitle Completed in 0ms
20 timing config:load:flatten Completed in 3ms
21 timing npm:load:display Completed in 5ms
22 verbose logfile C:\Users\Thilina\AppData\Local\npm-cache\_logs\2022-05-30T07_44_49_903Z-debug-0.log
23 timing npm:load:logFile Completed in 7ms
24 timing npm:load:timers Completed in 0ms
25 timing npm:load:configScope Completed in 0ms
26 timing npm:load Completed in 27ms
27 timing arborist:ctor Completed in 0ms
28 silly logfile start cleaning logs, removing 2 files
29 timing idealTree:init Completed in 6ms
30 timing idealTree:userRequests Completed in 2ms
31 silly idealTree buildDeps
32 silly fetch manifest yarn#*
33 http fetch GET 200 https://registry.npmjs.org/yarn 874ms (cache miss)
34 silly placeDep ROOT yarn#1.22.18 OK for: want: *
35 timing idealTree:#root Completed in 887ms
36 timing idealTree:node_modules/yarn Completed in 0ms
37 timing idealTree:buildDeps Completed in 888ms
38 timing idealTree:fixDepFlags Completed in 0ms
39 timing idealTree Completed in 899ms
40 timing reify:loadTrees Completed in 901ms
41 timing reify:diffTrees Completed in 1ms
42 silly reify moves {}
43 timing reify:retireShallow Completed in 0ms
44 timing reify:createSparse Completed in 1ms
45 timing reify:loadBundles Completed in 0ms
46 silly audit bulk request { yarn: [ '1.22.18' ] }
47 silly tarball no local data for yarn#https://registry.npmjs.org/yarn/-/yarn-1.22.18.tgz. Extracting by manifest.
48 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 445ms
49 timing auditReport:getReport Completed in 446ms
50 silly audit report {}
51 timing auditReport:init Completed in 0ms
52 timing reify:audit Completed in 446ms
53 http fetch GET 200 https://registry.npmjs.org/yarn/-/yarn-1.22.18.tgz 3096ms (cache miss)
54 timing reifyNode:node_modules/yarn Completed in 3103ms
55 timing reify:unpack Completed in 3104ms
56 timing reify:unretire Completed in 0ms
57 timing build:queue Completed in 5ms
58 info run yarn#1.22.18 preinstall node_modules/yarn :; (node ./preinstall.js > /dev/null 2>&1 || true)
59 info run yarn#1.22.18 preinstall { code: 1, signal: null }
60 timing reify:rollback:createSparse Completed in 6ms
61 timing reify:rollback:retireShallow Completed in 0ms
62 timing command:install Completed in 8818ms
63 verbose stack Error: command failed
63 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
63 verbose stack at ChildProcess.emit (node:events:527:28)
63 verbose stack at maybeClose (node:internal/child_process:1092:16)
63 verbose stack at Socket.<anonymous> (node:internal/child_process:451:11)
63 verbose stack at Socket.emit (node:events:527:28)
63 verbose stack at Pipe.<anonymous> (node:net:709:12)
64 verbose pkgid yarn#1.22.18
65 verbose cwd F:\ReactNative\React\ReactWithMosh
66 verbose Windows_NT 10.0.19042
67 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yarn"
68 verbose node v16.15.0
69 verbose npm v8.5.5
70 error code 1
71 error path C:\Users\Thilina\AppData\Roaming\npm\node_modules\yarn
72 error command failed
73 error command bash -c :; (node ./preinstall.js > /dev/null 2>&1 || true)
74 verbose exit 1
75 timing npm Completed in 9221ms
76 verbose unfinished npm timer reify 1653896690302
77 verbose unfinished npm timer reify:build 1653896694324
78 verbose unfinished npm timer build 1653896694324
79 verbose unfinished npm timer build:deps 1653896694324
80 verbose unfinished npm timer build:run:preinstall 1653896694329
81 verbose unfinished npm timer build:run:preinstall:node_modules/yarn 1653896694330
82 verbose code 1
83 error A complete log of this run can be found in:
83 error C:\Users\Thilina\AppData\Local\npm-cache\_logs\2022-05-30T07_44_49_903Z-debug-0.log
Ok So I managed to fix the react Install issue with the following command
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
error occurs because of a post install script trying to run and it fails to find bash
When I try to npm install or npm install, I see "Cannot read properties of null (reading 'edgesOut')" and I have package.json I add screenshots, please help me, thanks a lot.
And that's my error log.
`0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'install',
0 verbose cli 'react-scripts'
0 verbose cli ]
1 info using npm#8.1.2
2 info using node#v16.13.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\muhammed.eviz\Desktop\HAKİM\hakim-ui\.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\muhammed.eviz\.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\muhammed.eviz\AppData\Roaming\npm\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 0ms
18 timing config:load Completed in 7ms
19 timing npm:load:configload Completed in 7ms
20 timing npm:load:setTitle Completed in 1ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 2ms
23 timing npm:load:cleanupLog Completed in 2ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 13ms
27 timing arborist:ctor Completed in 0ms
28 timing arborist:ctor Completed in 0ms
29 timing idealTree:init Completed in 10ms
30 timing idealTree:userRequests Completed in 2ms
31 silly idealTree buildDeps
32 silly fetch manifest #reduxjs/toolkit#^1.6.2
33 http fetch GET 200 https://registry.npmjs.org/#reduxjs%2ftoolkit 444ms (cache revalidated)
34 timing idealTree Completed in 464ms
35 timing command:install Completed in 478ms
36 verbose stack TypeError: Cannot read properties of null (reading 'edgesOut')
36 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1282:38)
36 verbose stack at Arborist.[nodeFromEdge] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1103:30)
36 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:930:11)
36 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
36 verbose stack at async Promise.all (index 1)
36 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\reify.js:149:5)
36 verbose stack at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:170:5)
37 verbose cwd C:\Users\muhammed.eviz\Desktop\HAKİM\hakim-ui
38 verbose Windows_NT 10.0.19042
39 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "react-scripts"
40 verbose node v16.13.1
41 verbose npm v8.1.2
42 error Cannot read properties of null (reading 'edgesOut')
43 verbose exit 1`
error screenshot1 - when npm install
error screenshot2 - when npm install
my folder structure
If you try to install some packages to a project path which has non-Unicode characters like the following in the path's name
ÇŞİĞÜæÂÊ...
you will get errors.
The below path will work if you try to install packages here.
C:\Users\andrew\project
But this path will not work because it has Unicode in its name.
C:\Users\ândrew\project
EDIT: The best way of solve this problem is using memory card. (Like C:, D:, F:...)
I make a react app using the command "npx create-react-app" and I try to start the development server without doing any changes to it using "npm start" and it ends with this error
picture: https://i.stack.imgur.com/r28sS.png
and this is the log file
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'start'
0 verbose cli ]
1 info using npm#8.1.0
2 info using node#v16.13.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:T:\t\Projects\React.js\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\thevi\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\thevi\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
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 npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 4ms
23 timing npm:load:cleanupLog Completed in 7ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 31ms
27 timing command:run-script Completed in 3ms
28 timing command:start Completed in 16ms
29 verbose stack Error: ENOENT: no such file or directory, open 'T:\t\Projects\React.js\package.json'
30 verbose cwd T:\t\Projects\React.js
31 verbose Windows_NT 10.0.22000
32 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
33 verbose node v16.13.0
34 verbose npm v8.1.0
35 error code ENOENT
36 error syscall open
37 error path T:\t\Projects\React.js/package.json
38 error errno -4058
39 error enoent ENOENT: no such file or directory, open 'T:\t\Projects\React.js\package.json'
40 error enoent This is related to npm not being able to find a file.
41 verbose exit -4058
You should first go to your project directory, in your case it is called anatha_1.
So, run cd anatha_1, then npm start.
npm start or any other npm script, looks for the package.json file in the current working directory.
It is also what is written by create-react-app at the end of its output, so please follow the guidelines.
Working on an electron project (im not very good with node.js) and am getting this same parsing error every time I run. I'm not sure how to fix it because this is my first time using electron for html.
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'start'
0 verbose cli ]
1 info using npm#8.1.0
2 info using node#v17.0.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\Administrator\electron-quick-start\.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\Administrator\.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\Administrator\AppData\Roaming\npm\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 1ms
18 timing config:load Completed in 11ms
19 timing npm:load:configload Completed in 11ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing config:load:flatten Completed in 4ms
23 timing npm:load:cleanupLog Completed in 3ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 23ms
27 timing command:run-script Completed in 6ms
28 timing command:start Completed in 13ms
29 verbose stack JSONParseError: Unexpected string in JSON at position 238 while parsing '{
29 verbose stack "name": "uswl",
29 verbose stack "version": "1.0.0"'
29 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json-fast\index.js:11:61
29 verbose stack at async RunScript.run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:87:19)
30 verbose cwd C:\Users\Administrator\electron-quick-start
31 verbose Windows_NT 10.0.19042
32 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
33 verbose node v17.0.0
34 verbose npm v8.1.0
35 error code EJSONPARSE
36 error path C:\Users\Administrator\electron-quick-start/package.json
37 error JSON.parse Unexpected string in JSON at position 238 while parsing '{
37 error JSON.parse "name": "uswl",
37 error JSON.parse "version": "1.0.0"'
38 error JSON.parse Failed to parse JSON data.
38 error JSON.parse Note: package.json must be actual JSON, not just JavaScript.
39 verbose exit 1```
When I try the nodemailer module, the following log error pops up:
0 verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'install',
0 verbose cli 'nodemailer'
0 verbose cli ]
1 info using npm#7.12.1
2 info using node#v15.7.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 0ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/home/ubuntu/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 1ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 8ms
18 timing npm:load:configload Completed in 9ms
19 timing npm:load:setTitle Completed in 0ms
20 timing npm:load:setupLog Completed in 2ms
21 timing npm:load:cleanupLog Completed in 3ms
22 timing npm:load:configScope Completed in 0ms
23 timing npm:load:projectScope Completed in 1ms
24 timing npm:load Completed in 16ms
25 timing config:load:flatten Completed in 4ms
26 timing arborist:ctor Completed in 1ms
27 timing idealTree:init Completed in 177ms
28 timing idealTree:userRequests Completed in 4ms
29 silly idealTree buildDeps
30 silly fetch manifest nodemailer#^4.7.0
31 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
32 http fetch GET 304 https://registry.npmjs.org/nodemailer 220ms (from cache)
33 silly fetch manifest type#module
34 http fetch GET 304 https://registry.npmjs.org/type 42ms (from cache)
35 silly placeDep ROOT nodemailer#4.7.0 OK for: biogoapp#1.0.0 want: ^4.7.0
36 silly placeDep ROOT type# OK for: biogoapp#1.0.0 want: module
37 timing idealTree:#root Completed in 284ms
38 timing idealTree:node_modules/nodemailer Completed in 0ms
39 timing idealTree:node_modules/type Completed in 0ms
40 timing idealTree:buildDeps Completed in 285ms
41 timing idealTree:fixDepFlags Completed in 4ms
42 timing idealTree Completed in 471ms
43 timing command:install Completed in 502ms
44 verbose type tag
45 verbose stack type: No matching version found for type#module.
45 verbose stack at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
45 verbose stack at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
45 verbose stack at async Arborist.[nodeFromEdge] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:947:19)
45 verbose stack at async Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:893:11)
45 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
45 verbose stack at async Promise.all (index 1)
45 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:135:5)
45 verbose stack at async Install.install (/usr/local/lib/node_modules/npm/lib/install.js:137:5)
46 verbose cwd /home/ubuntu
47 verbose Linux 5.8.0-29-generic
48 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nodemailer"
49 verbose node v15.7.0
50 verbose npm v7.12.1
51 error code ETARGET
52 error notarget No matching version found for type#module.
53 error notarget In most cases you or one of your dependencies are requesting
53 error notarget a package version that doesn't exist.
54 verbose exit 1
I tried to remove package_lock and node_modules but any installation via npm ends with an error: notarget No matching version found for type # module. I'm just learning node any tips will be of great help. Attempts at various solutions found on google to similar errors did not produce results.
I solved by doing npm install -g instead - not sure what the long-term consequences might be but it works for now.