Webpack not installing on linux - node.js

Recently i changed my environment from windows 10 to backbox linux 4.5.1 but i have tried to install webpack using npm several times . It never installs it gives these errors. Any help ?
verbose tar unpack /home/dove/.npm/webpack/1.12.13/package.tgz
34 silly lockFile 27155615-tar-usr-lib-node-modules-webpack tar:///usr/lib/node_modules/webpack
35 verbose lock tar:///usr/lib/node_modules/webpack /home/dove/.npm/27155615-tar-usr-lib-node-modules-webpack.lock
36 silly lockFile 5c48f9fd--npm-webpack-1-12-13-package-tgz tar:///home/dove/.npm/webpack/1.12.13/package.tgz
37 verbose lock tar:///home/dove/.npm/webpack/1.12.13/package.tgz /home/dove/.npm/5c48f9fd--npm-webpack-1-12-13-package-tgz.lock
38 silly gunzTarPerm modes [ '775', '664' ]
39 error Error: EACCES, mkdir '/usr/lib/node_modules/webpack'
39 error { [Error: EACCES, mkdir '/usr/lib/node_modules/webpack']
39 error errno: 3,
39 error code: 'EACCES',
39 error path: '/usr/lib/node_modules/webpack',
39 error fstream_type: 'Directory',
39 error fstream_path: '/usr/lib/node_modules/webpack',
39 error fstream_class: 'DirWriter',
39 error fstream_stack:
39 error [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
39 error '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
39 error 'Object.oncomplete (fs.js:108:15)' ] }
40 error Please try running this command again as root/Administrator.
41 error System Linux 4.2.0-30-generic
42 error command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "webpack#1.12.13"
43 error cwd /home/dove/projects/yulu
44 error node -v v0.10.37
45 error npm -v 1.4.28
46 error path /usr/lib/node_modules/webpack
47 error fstream_path /usr/lib/node_modules/webpack
48 error fstream_type Directory
49 error fstream_class DirWriter
50 error code EACCES
51 error errno 3
52 error stack Error: EACCES, mkdir '/usr/lib/node_modules/webpack'
53 error fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
53 error fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
53 error fstream_stack Object.oncomplete (fs.js:108:15)
54 verbose exit [ 3, true ]

I think problem is about trying to install npm without sudo privileges since it gave an access error.
"Error: EACCES, mkdir '/usr/lib/node_modules/webpack'"
you should try to run your command with prefix of "sudo"
sudo "your-command"
Also you can try this command too.
npm config set unsafe-perm=true
There is a discussion about this error in github you might want to check it out.
https://github.com/Microsoft/BashOnWindows/issues/14

Related

jasmine version error while running ng new command

I am getting error while running ng new command
below error is fired during the ng new Project-Name-Here
Could not resolve dependency:
error peer jasmine-core#">=3.7.1" from karma-jasmine-html-reporter#1.6.0
silly fetch manifest jasmine-core#>=3.7.1
83 timing idealTree Completed in 8839ms
84 timing command:install Completed in 8849ms
85 verbose stack Error: unable to resolve dependency tree
85 verbose stack at Arborist.[failPeerConflict] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1141:25)
85 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1118:34)
85 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:836:11)
85 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:209:7)
85 verbose stack at async Promise.all (index 1)
85 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\reify.js:130:5)
85 verbose stack at async install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:38:3)
86 verbose cwd C:\Users\PYH0JFQ\source\Hospital\Patient
87 verbose Windows_NT 10.0.19041
88 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--quiet"
89 verbose node v15.11.0
90 verbose npm v7.6.0
91 error code ERESOLVE
92 error ERESOLVE unable to resolve dependency tree
93 error
94 error While resolving: patient#0.0.0
94 error Found: jasmine-core#3.6.0
94 error node_modules/jasmine-core
94 error dev jasmine-core#"~3.6.0" from the root project
94 error
94 error Could not resolve dependency:
94 error peer jasmine-core#">=3.7.1" from karma-jasmine-html-reporter#1.6.0
94 error node_modules/karma-jasmine-html-reporter
94 error dev karma-jasmine-html-reporter#"^1.5.0" from the root project
94 error
94 error Fix the upstream dependency conflict, or retry
94 error this command with --force, or --legacy-peer-deps
94 error to accept an incorrect (and potentially broken) dependency resolution.
I have faced the same issue recently and i got to know this from an online instructor.
you should have phrase the question neatly, anyways
This error is caused by an npm 7 issue. The Angular team recommends to use npm 6 for now.
so downgrade the npm 7 to npm 6 for now
npm install -g npm#6
or
An alternative can be to run ng new with the --skipInstall flag, and then install the dependencies with npm install --legacy-peer-deps.
I found, what I feel is, a better solution.
After running the ng new - go into package.json and simply change
"jasmine-core": "~3.7.0",
to
"jasmine-core": "~3.8.0",
and then run npm install afterwards.

How do I fix this error installing npm connect on my computer

I recently installed node on my windows 8 computer and tested it and it seems to work fine. But when I try to install it I get this error
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" "install" "connect"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! syscall connect
npm ERR! Error: connect EACCES
npm ERR! at exports._errnoException (util.js:746:11)
npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
npm ERR! { [Error: connect EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'c
onnect' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\WINDOWS\system32\npm-debug.log
these are the contents of the npm-debug.log file from before I tried installing running cmd as administrator
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 'connect' ]
2 info using npm#2.15.1
3 info using node#v4.4.3
4 verbose install initial load of C:\Users\owner\Desktop\Node.js\package.json
5 verbose readDependencies loading dependencies from C:\Users\owner\Desktop\Node.js\package.json
6 silly cache add args [ 'connect', null ]
7 verbose cache add spec connect
8 silly cache add parsed spec Result {
8 silly cache add raw: 'connect',
8 silly cache add scope: null,
8 silly cache add name: 'connect',
8 silly cache add rawSpec: '',
8 silly cache add spec: 'latest',
8 silly cache add type: 'tag' }
9 silly addNamed connect#latest
10 verbose addNamed "latest" is being treated as a dist-tag for connect
11 info addNameTag [ 'connect', 'latest' ]
12 silly mapToRegistry name connect
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry data Result {
15 silly mapToRegistry raw: 'connect',
15 silly mapToRegistry scope: null,
15 silly mapToRegistry name: 'connect',
15 silly mapToRegistry rawSpec: '',
15 silly mapToRegistry spec: 'latest',
15 silly mapToRegistry type: 'tag' }
16 silly mapToRegistry uri https://registry.npmjs.org/connect
17 verbose addNameTag registry:https://registry.npmjs.org/connect not in flight; fetching
18 verbose request uri https://registry.npmjs.org/connect
19 verbose request no auth needed
20 info attempt registry request try #1 at 11:26:28 PM
21 verbose request id d04b099ed5c5d169
22 http request GET https://registry.npmjs.org/connect
23 info retry will retry, error on last attempt: Error: connect EACCES 23.235.40.162:443
24 info attempt registry request try #2 at 11:26:38 PM
25 http request GET https://registry.npmjs.org/connect
26 info retry will retry, error on last attempt: Error: connect EACCES 23.235.39.162:443
27 info attempt registry request try #3 at 11:27:38 PM
28 http request GET https://registry.npmjs.org/connect
29 verbose stack Error: connect EACCES 23.235.46.162:443
29 verbose stack at Object.exports._errnoException (util.js:870:11)
29 verbose stack at exports._exceptionWithHostPort (util.js:893:20)
29 verbose stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
30 verbose cwd C:\Users\owner\Desktop\Node.js
31 error Windows_NT 6.2.9200
32 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "connect"
33 error node v4.4.3
34 error npm v2.15.1
35 error code EACCES
36 error errno EACCES
37 error syscall connect
38 error Error: connect EACCES 23.235.46.162:443 38 error at Object.exports._errnoException (util.js:870:11)
38 error at exports._exceptionWithHostPort (util.js:893:20)
38 error at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
38 error { [Error: connect EACCES 23.235.46.162:443]
38 error code: 'EACCES',
38 error errno: 'EACCES',
38 error syscall: 'connect',
38 error address: '23.235.46.162',
38 error port: 443 }
39 error Please try running this command again as root/Administrator.
40 verbose exit [ 1, true ]
I have already tried running the command "npm install connect" as Administrator and got the same thing. Can anyone help?
The error occurs because you probably installed Node with root permissions but you're not executing npm with the same permissions. Permissions you used when installing Node will be required when doing things like writing in your npm directory (npm link, npm install -g, etc.).
The recommended way to fix this is by installing nvm-windows and using this to manage your Node installations. This prevents you from having to hack around the permissions on your machine.

Cordova and Ionic do not Install Under OS X Capitan (Version 10.11.1)

I recently updated my Mac to OS X El Capitan (Version 10.11.1) and now have trouble with my cordova and ionic installations. Both run well under Yosemite.
$ npm –v
shows
$ 3.3.12
$ node
shows
$ v5.0.0
$ sudo npm install –g cordova ionic
shows
$ npm ERR! addLocal Could not install /Applications/Xcode.app/–g
$ npm ERR! Darwin 15.0.0
$ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "–g" "cordova" "ionic"
$ npm ERR! node v5.0.0
$ npm ERR! npm v3.3.12
$ npm ERR! path /Applications/Xcode.app/–g
$ npm ERR! code ENOENT
$ npm ERR! errno -2
$ npm ERR! syscall open
$
$ npm ERR! enoent ENOENT: no such file or directory, open '/Applications/Xcode.app/–g'
$ npm ERR! enoent This is most likely not a problem with npm itself
$ npm ERR! enoent and is related to npm not being able to find a file.
$ npm ERR! enoent
$
$ npm ERR! Please include the following file with any support request:
$ npm ERR! /Applications/Xcode.app/npm-debug.log
Here the content of this log file:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '–g',
1 verbose cli 'cordova',
1 verbose cli 'ionic' ]
2 info using npm#3.3.12
3 info using node#v5.0.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData –g
8 silly fetchPackageMetaData cordova
9 silly fetchPackageMetaData ionic
10 silly fetchOtherPackageData –g
11 silly cache add args [ '–g', null ]
12 verbose cache add spec –g
13 silly fetchNamedPackageData cordova
14 silly mapToRegistry name cordova
15 silly mapToRegistry using default registry
16 silly mapToRegistry registry https://registry.npmjs.org/
17 silly mapToRegistry uri https://registry.npmjs.org/cordova
18 silly fetchNamedPackageData ionic
19 silly mapToRegistry name ionic
20 silly mapToRegistry using default registry
21 silly mapToRegistry registry https://registry.npmjs.org/
22 silly mapToRegistry uri https://registry.npmjs.org/ionic
23 silly cache add parsed spec Result {
23 silly cache add raw: '–g',
23 silly cache add scope: null,
23 silly cache add name: null,
23 silly cache add rawSpec: '–g',
23 silly cache add spec: '/Applications/Xcode.app/–g',
23 silly cache add type: 'local' }
24 error addLocal Could not install /Applications/Xcode.app/–g
25 silly fetchPackageMetaData Error: ENOENT: no such file or directory, open '/Applications/Xcode.app/–g'
25 silly fetchPackageMetaData at Error (native)
25 silly fetchPackageMetaData error for –g { [Error: ENOENT: no such file or directory, open '/Applications/Xcode.app/–g']
25 silly fetchPackageMetaData errno: -2,
25 silly fetchPackageMetaData code: 'ENOENT',
25 silly fetchPackageMetaData syscall: 'open',
25 silly fetchPackageMetaData path: '/Applications/Xcode.app/–g' }
26 verbose request uri https://registry.npmjs.org/cordova
27 verbose request no auth needed
28 info attempt registry request try #1 at 16:52:51
29 verbose request id 37de52bb0c078959
30 verbose etag "3I2GKY5YJDCEH0E25NKOJONR5"
31 http request GET https://registry.npmjs.org/cordova
32 verbose request uri https://registry.npmjs.org/ionic
33 verbose request no auth needed
34 info attempt registry request try #1 at 16:52:51
35 verbose etag "D4ZWHYNBKT52VU9GGXKKX7DYM"
36 http request GET https://registry.npmjs.org/ionic
37 http 400 https://registry.npmjs.org/ionic
38 verbose headers {}
39 silly get cb [ 304, undefined ]
40 verbose etag https://registry.npmjs.org/ionic from cache
41 verbose get saving ionic to /Users/dirk/.npm/registry.npmjs.org/ionic/.cache.json
42 http 400 https://registry.npmjs.org/cordova
43 verbose headers {}
44 silly get cb [ 304, undefined ]
45 verbose etag https://registry.npmjs.org/cordova from cache
46 verbose get saving cordova to /Users/dirk/.npm/registry.npmjs.org/cordova/.cache.json
47 silly rollbackFailedOptional Starting
48 silly rollbackFailedOptional Finishing
49 silly runTopLevelLifecycles Starting
50 silly runTopLevelLifecycles Finishing
51 silly install printInstalled
52 verbose stack Error: ENOENT: no such file or directory, open '/Applications/Xcode.app/–g'
52 verbose stack at Error (native)
53 verbose cwd /Applications/Xcode.app
54 error Darwin 15.0.0
55 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "–g" "cordova" "ionic"
56 error node v5.0.0
57 error npm v3.3.12
58 error path /Applications/Xcode.app/–g
59 error code ENOENT
60 error errno -2
61 error syscall open
62 error enoent ENOENT: no such file or directory, open '/Applications/Xcode.app/–g'
62 error enoent This is most likely not a problem with npm itself
62 error enoent and is related to npm not being able to find a file.
63 verbose exit [ -2, true ]
Thanks in advance!
I am running both cordova and Ionic on 10.11.1 without a problem
node is 5.10
npm is 3.3.12 (because 3.4.1 crashes cordova)
ionic is 1.7.10
cordova is 5.4.0
All installed using npm via terminal after fresh 10.11.1 install.
that being said, XCode has been downloaded and installed as well,
Suggest remove and reinstall node and npm from downloaded installer from node site. That was the path I followed.

Running Grunt commands Windows 8

I am trying to install Grunt using
npm install -g grunt-cli
But am getting an error I do not know how to interpret, I am new to Grunt and web dev. I am certain I have a valid installation of npm and node.js.
If anyone could explain what the following npm-debug file means and/or what I should do to get a valid grunt installation, that would be extremely helpful.
I am installing Grunt because it is used to build Bootstrap.
Sorry to dump a big error log, I am not sure how much of it is meaningful.
11 verbose addNamed [ 'grunt-cli', '' ]
12 verbose addNamed [ null, '*' ]
13 silly lockFile d63f3d0b-grunt-cli grunt-cli#
14 verbose lock grunt-cli# C:\Users\Kelsey\AppData\Roaming\npm-cache\d63f3d0b-grunt-cli.lock
15 silly addNameRange { name: 'grunt-cli', range: '*', hasData: false }
16 verbose url raw grunt-cli
17 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-cli' ]
18 verbose url resolved https://registry.npmjs.org/grunt-cli
19 info trying registry request attempt 1 at 10:24:14
20 http GET https://registry.npmjs.org/grunt-cli
21 info retry will retry, error on last attempt: Error: getaddrinfo EAGAIN
22 info trying registry request attempt 2 at 10:24:24
23 http GET https://registry.npmjs.org/grunt-cli
24 info retry will retry, error on last attempt: Error: getaddrinfo EAGAIN
25 info trying registry request attempt 3 at 10:25:24
26 http GET https://registry.npmjs.org/grunt-cli
27 silly lockFile d63f3d0b-grunt-cli grunt-cli#
28 silly lockFile d63f3d0b-grunt-cli grunt-cli#
29 error Error: getaddrinfo EAGAIN
29 error at errnoException (dns.js:37:11)
29 error at Object.onanswer [as oncomplete] (dns.js:124:16)
30 error If you need help, you may report this *entire* log,
30 error including the npm and node versions, at:
30 error <http://github.com/npm/npm/issues>
31 error System Windows_NT 6.2.9200
32 error command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
33 error cwd c:\Users\Kelsey\Documents
34 error node -v v0.10.29
35 error npm -v 1.4.14
36 error syscall getaddrinfo
37 error code EAGAIN
38 error errno EAGAIN
39 verbose exit [ 1, true ]
It looks like the cmd/command shell is attempting to run grunt commands with insufficient permissions.
Start the cmd/command shell as administrator, then the problem should be resolved.

npm install -g cordova windows 8 error

I'm trying to install cordova, in windows 8, but throws me this error.
I'm running the cmd as administrator and the file "C: \ Program Files (x86) \ nodejs \ node.exe" I configured to be executed as administrator.
19 info trying registry request attempt 1 at 17:24:08
20 http GET http://registry.npmjs.org/cordova
21 info retry will retry, error on last attempt: Error: connect EACCES
22 info trying registry request attempt 2 at 17:24:19
23 http GET http://registry.npmjs.org/cordova
24 info retry will retry, error on last attempt: Error: connect EACCES
25 info trying registry request attempt 3 at 17:25:20
26 http GET http://registry.npmjs.org/cordova
27 silly lockFile de8d9fad-cordova cordova#
28 silly lockFile de8d9fad-cordova cordova#
29 error Error: connect EACCES
29 error at errnoException (net.js:901:11)
29 error at Object.afterConnect [as oncomplete] (net.js:892:19)
29 error { [Error: connect EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'connect' }
30 error Please try running this command again as root/Administrator.
31 error System Windows_NT 6.2.9200
32 error command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
33 error cwd C:\
34 error node -v v0.10.22
35 error npm -v 1.3.14
36 error syscall connect
37 error code EACCES
38 error errno EACCES
39 error stack Error: connect EACCES
39 error stack at errnoException (net.js:901:11)
39 error stack at Object.afterConnect [as oncomplete] (net.js:892:19)
40 verbose exit [ 1, true ]
Thanks in advance.

Resources