Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] <All runners/plugins are externally being added outside node_modules npm install> #1171

Closed
sshaiakhmedov opened this issue Apr 17, 2020 · 16 comments
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release

Comments

@sshaiakhmedov
Copy link

sshaiakhmedov commented Apr 17, 2020

What / Why

  • Whenever I start new project or lets say i clone rep from gitHub, run npm install --> all modules are being installed in a root folder= outside node_modules folder looking like a mess and no way to run tests

When

Examples

  • Whenever I run npm install or any other command to add new dependencies, plugins (npm i --save-dev @wdio/cli OR npx wdio config -y
  • Whenever I run this commands in terminal

Where

Examples

  • WebStorm by JetBrains in Terminal (whatever terminal I use)

How

Current Behavior

  • All files after npm install or other code are installed outside, it is like 40-60 files including **README.md, ** package.json etc. I have node, npm of latest versions. I would attach the result on terminal or send Terminal log here at the end.

Steps to Reproduce

  • clone projec from GitHub, npm init -y, npm i --save-dev @wdio/cli

Expected Behavior

after npm install you know better how it should be, I should have readme.md, package.json and wdio.config.js and very few more but not 40-60 files in the root folder.

Who

  • n/a

References

Log from Terminal:
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN notsup Unsupported engine for fibers_node_v8@3.1.5: wanted: {"node":">=8.0.0 <10.0.0"} (current: {"node":"12.16.2","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: fibers_node_v8@3.1.5
npm WARN @wdio/allure-reporter@6.0.14 requires a peer of @wdio/cli@^6.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev@1.1.1 (node_modules\fsevents\node_modules\abbrev):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\abbrev' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents
\node_modules.abbrev.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ansi-regex@2.1.1 (node_modules\fsevents\node_modules\ansi-regex):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\ansi-regex' -> 'C:\Users\cdtilestone\ps\node_modules\fsev
ents\node_modules.ansi-regex.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: aproba@1.2.0 (node_modules\fsevents\node_modules\aproba):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\aproba' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents
\node_modules.aproba.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: balanced-match@1.0.0 (node_modules\fsevents\node_modules\balanced-match):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\balanced-match' -> 'C:\Users\cdtilestone\ps\node_modules
fsevents\node_modules.balanced-match.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: chownr@1.1.4 (node_modules\fsevents\node_modules\chownr):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\chownr' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents
\node_modules.chownr.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: code-point-at@1.1.0 (node_modules\fsevents\node_modules\code-point-at):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\code-point-at' -> 'C:\Users\cdtilestone\ps\node_modules\f
sevents\node_modules.code-point-at.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: concat-map@0.0.1 (node_modules\fsevents\node_modules\concat-map):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\concat-map' -> 'C:\Users\cdtilestone\ps\node_modules\fsev
ents\node_modules.concat-map.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: console-control-strings@1.1.0 (node_modules\fsevents\node_modules\console-control-strings):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\console-control-strings' -> 'C:\Users\cdtilestone\ps\node
_modules\fsevents\node_modules.console-control-strings.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-util-is@1.0.2 (node_modules\fsevents\node_modules\core-util-is):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\core-util-is' -> 'C:\Users\cdtilestone\ps\node_modules\fs
events\node_modules.core-util-is.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: deep-extend@0.6.0 (node_modules\fsevents\node_modules\deep-extend):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\deep-extend' -> 'C:\Users\cdtilestone\ps\node_modules\fse
vents\node_modules.deep-extend.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: delegates@1.0.0 (node_modules\fsevents\node_modules\delegates):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\delegates' -> 'C:\Users\cdtilestone\ps\node_modules\fseve
nts\node_modules.delegates.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: detect-libc@1.0.3 (node_modules\fsevents\node_modules\detect-libc):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\detect-libc' -> 'C:\Users\cdtilestone\ps\node_modules\fse
vents\node_modules.detect-libc.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs.realpath@1.0.0 (node_modules\fsevents\node_modules\fs.realpath):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\fs.realpath' -> 'C:\Users\cdtilestone\ps\node_modules\fse
vents\node_modules.fs.realpath.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: has-unicode@2.0.1 (node_modules\fsevents\node_modules\has-unicode):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\has-unicode' -> 'C:\Users\cdtilestone\ps\node_modules\fse
vents\node_modules.has-unicode.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: inherits@2.0.4 (node_modules\fsevents\node_modules\inherits):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\inherits' -> 'C:\Users\cdtilestone\ps\node_modules\fseven
ts\node_modules.inherits.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ini@1.3.5 (node_modules\fsevents\node_modules\ini):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\ini' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents\no
de_modules.ini.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: isarray@1.0.0 (node_modules\fsevents\node_modules\isarray):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\isarray' -> 'C:\Users\cdtilestone\ps\node_modules\fsevent
s\node_modules.isarray.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@1.2.5 (node_modules\fsevents\node_modules\minimist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\minimist' -> 'C:\Users\cdtilestone\ps\node_modules\fseven
ts\node_modules.minimist.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ms@2.1.2 (node_modules\fsevents\node_modules\ms):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\ms' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents\nod
e_modules.ms.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm-normalize-package-bin@1.0.1 (node_modules\fsevents\node_modules\npm-normalize-package-bin):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\npm-normalize-package-bin' -> 'C:\Users\cdtilestone\ps\no
de_modules\fsevents\node_modules.npm-normalize-package-bin.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: number-is-nan@1.0.1 (node_modules\fsevents\node_modules\number-is-nan):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\number-is-nan' -> 'C:\Users\cdtilestone\ps\node_modules\f
sevents\node_modules.number-is-nan.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-assign@4.1.1 (node_modules\fsevents\node_modules\object-assign):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\object-assign' -> 'C:\Users\cdtilestone\ps\node_modules\f
sevents\node_modules.object-assign.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-homedir@1.0.2 (node_modules\fsevents\node_modules\os-homedir):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\os-homedir' -> 'C:\Users\cdtilestone\ps\node_modules\fsev
ents\node_modules.os-homedir.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-tmpdir@1.0.2 (node_modules\fsevents\node_modules\os-tmpdir):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\os-tmpdir' -> 'C:\Users\cdtilestone\ps\node_modules\fseve
nts\node_modules.os-tmpdir.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: path-is-absolute@1.0.1 (node_modules\fsevents\node_modules\path-is-absolute):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\path-is-absolute' -> 'C:\Users\cdtilestone\ps\node_module
s\fsevents\node_modules.path-is-absolute.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: process-nextick-args@2.0.1 (node_modules\fsevents\node_modules\process-nextick-args):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\process-nextick-args' -> 'C:\Users\cdtilestone\ps\node_mo
dules\fsevents\node_modules.process-nextick-args.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safe-buffer@5.1.2 (node_modules\fsevents\node_modules\safe-buffer):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\safe-buffer' -> 'C:\Users\cdtilestone\ps\node_modules\fse
vents\node_modules.safe-buffer.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safer-buffer@2.1.2 (node_modules\fsevents\node_modules\safer-buffer):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\safer-buffer' -> 'C:\Users\cdtilestone\ps\node_modules\fs
events\node_modules.safer-buffer.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sax@1.2.4 (node_modules\fsevents\node_modules\sax):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\sax' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents\no
de_modules.sax.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: semver@5.7.1 (node_modules\fsevents\node_modules\semver):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\semver' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents
\node_modules.semver.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: set-blocking@2.0.0 (node_modules\fsevents\node_modules\set-blocking):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\set-blocking' -> 'C:\Users\cdtilestone\ps\node_modules\fs
events\node_modules.set-blocking.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: signal-exit@3.0.2 (node_modules\fsevents\node_modules\signal-exit):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\signal-exit' -> 'C:\Users\cdtilestone\ps\node_modules\fse
vents\node_modules.signal-exit.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: strip-json-comments@2.0.1 (node_modules\fsevents\node_modules\strip-json-comments):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\strip-json-comments' -> 'C:\Users\cdtilestone\ps\node_mod
ules\fsevents\node_modules.strip-json-comments.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: util-deprecate@1.0.2 (node_modules\fsevents\node_modules\util-deprecate):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\util-deprecate' -> 'C:\Users\cdtilestone\ps\node_modules
fsevents\node_modules.util-deprecate.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wrappy@1.0.2 (node_modules\fsevents\node_modules\wrappy):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\wrappy' -> 'C:\Users\cdtilestone\ps\node_modules\fsevents
\node_modules.wrappy.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: yallist@3.1.1 (node_modules\fsevents\node_modules\yallist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\cdtilestone\ps\node_modules\fsevents\node_modules\yallist' -> 'C:\Users\cdtilestone\ps\node_modules\fsevent
s\node_modules.yallist.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\mocha\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules@wdio\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 761 packages from 439 contributors in 114.541s

@ljharb
Copy link
Collaborator

ljharb commented Apr 17, 2020

What in ~/.npmrc?

@sshaiakhmedov
Copy link
Author

sshaiakhmedov commented Apr 17, 2020

I don't see it inside the project folder at all, I've found it here C:\Program Files\nodejs\node_modules\npm, but I don't know what is inside and how to check and it is 0 KB. I usually don't create it myself. Can you help me what is next?

@ljharb
Copy link
Collaborator

ljharb commented Apr 17, 2020

ah, you're on windows. what does npm config get prefix say, in your project dir?

@sshaiakhmedov
Copy link
Author

yes, Windows. This command just populate my project Path that is it

@ljharb
Copy link
Collaborator

ljharb commented Apr 17, 2020

What's the exact value it returns

@sshaiakhmedov
Copy link
Author

$ npm config get prefix
C:\Users\cdtilestone\PASV-UI

@ljharb
Copy link
Collaborator

ljharb commented Apr 17, 2020

ok, so that's the problem - it should be returning the directory in which node is installed. Maybe try npm config edit and make sure there's no "prefix" line?

@sshaiakhmedov
Copy link
Author

wow, it opened .npmrc in Notepad:
;;;;
; npm userconfig file
; this is a simple ini-formatted file
; lines that start with semi-colons are comments.
; read npm help config for help on the various options
;;;;

script-shell=C:\Program Files\git\bin\bash.exe
prefix=C:\Users\cdtilestone\PASV-UI

;;;;
; all options with default values
;;;;
; access=null

; allow-same-version=false

; always-auth=false

; also=null

; audit=true

; audit-level=low

; auth-type=legacy

; before=null

; bin-links=true

; browser=null

; ca=null

; cafile=undefined

; cache=C:\Users\cdtilestone\AppData\Roaming\npm-cache

; cache-lock-stale=60000

; cache-lock-retries=10

; cache-lock-wait=10000

; cache-max=null

; cache-min=10

; cert=null

; cidr=null

; color=true

; depth=null

; description=true

; dev=false

; dry-run=false

; editor=notepad.exe

; engine-strict=false

; force=false

; format-package-lock=true

; fund=true

; fetch-retries=2

; fetch-retry-factor=10

; fetch-retry-mintimeout=10000

; fetch-retry-maxtimeout=60000

; git=git

; git-tag-version=true

; commit-hooks=true

; global=false

; globalconfig=C:\Users\cdtilestone\PASV-UI\etc\npmrc

; global-style=false

; group=0

; ham-it-up=false

; heading=npm

; if-present=false

; ignore-prepublish=false

; ignore-scripts=false

; init-module=C:\Users\cdtilestone.npm-init.js

; init-author-name=

; init-author-email=

; init-author-url=

; init-version=1.0.0

; init-license=ISC

; json=false

; key=null

; legacy-bundling=false

; link=false

; local-address=undefined

; loglevel=notice

; logs-max=10

; long=false

; maxsockets=50

; message=%s

; metrics-registry=null

; node-options=null

; node-version=12.16.2

; offline=false

; onload-script=null

; only=null

; optional=true

; otp=null

; package-lock=true

; package-lock-only=false

; parseable=false

; prefer-offline=false

; prefer-online=false

; prefix=C:\Program Files\nodejs

; preid=

; production=false

; progress=true

; proxy=null

; https-proxy=null

; noproxy=null

; user-agent=npm/{npm-version} node/{node-version} {platform} {arch} {ci}

; read-only=false

; rebuild-bundle=true

; registry=https://registry.npmjs.org/

; rollback=true

; save=true

; save-bundle=false

; save-dev=false

; save-exact=false

; save-optional=false

; save-prefix=^

; save-prod=false

; scope=

; script-shell=null

; scripts-prepend-node-path=warn-only

; searchopts=

; searchexclude=null

; searchlimit=20

; searchstaleness=900

; send-metrics=false

; shell=C:\WINDOWS\system32\cmd.exe

; shrinkwrap=true

; sign-git-commit=false

; sign-git-tag=false

; sso-poll-frequency=500

; sso-type=oauth

; strict-ssl=true

; tag=latest

; tag-version-prefix=v

; timing=false

; tmp=C:\Users\CDTILE~1\AppData\Local\Temp

; unicode=false

; unsafe-perm=true

; update-notifier=true

; usage=false

; user=0

; userconfig=C:\Users\cdtilestone.npmrc

; umask=0

; version=false

; versions=false

; viewer=browser

; _exit=true

; globalignorefile=C:\Users\cdtilestone\PASV-UI\etc\npmignore

@ljharb
Copy link
Collaborator

ljharb commented Apr 17, 2020

See ; prefix=C:\Program Files\nodejs? that shouldn't be there, i think. if you delete it, what does npm config get prefix print out?

@sshaiakhmedov
Copy link
Author

sshaiakhmedov commented Apr 17, 2020

whenever I delete this line from Notepad and then save--> close file--> npm config get prefix it again gives project path. I run again npm config edit --> the .npmrc file again shows this ; prefix=C:\Program Files\nodejs. So i don't know why it still contains this line

@sshaiakhmedov
Copy link
Author

Jordan, even if this works, how to fix it so i don't go and delete this line etc? Any idea?

@ljharb
Copy link
Collaborator

ljharb commented Apr 17, 2020

Not really sure :-/ hopefully someone who uses windows can help.

@sshaiakhmedov
Copy link
Author

sshaiakhmedov commented Apr 17, 2020 via email

@isaacs
Copy link
Contributor

isaacs commented Apr 18, 2020

The prefix config is treated a little bit special. The value in any .npmrc file is treated as the global install target. If that's where your things are going for local installs, then something weird is going on. If it's specified on the cli with an explicit argument, then the value given is used as the prefix for local installs as well. Otherwise, local installs always walk up the folder tree until they find either a package.json file or node_modules folder.

In the output you pasted, I see it's trying to put stuff in C:\Users\cdtilestone\ps\node_modules\... Do you have things in there after installation? Is C:\Users\cdtilestone\ps\ your project folder?

What happens if you do npm install abbrev? Do you get an abbrev.js in the current folder? (I ask this because I'm thinking it might be a weird behavior of a pre/post-install script from one of the packages being loaded.)

@sshaiakhmedov
Copy link
Author

sshaiakhmedov commented Apr 18, 2020

@isaacs I think I've got it, I've followed advises of @ljharb, after that I've uninstalled node, npm with WebStorm 2020.1, re-installed node and older version of WebStorm. So far it works. I may try to follow your steps but afraid to break something:)

@darcyclarke darcyclarke added Release 6.x work is associated with a specific npm 6 release Bug thing that needs fixing labels Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests

4 participants