-
Notifications
You must be signed in to change notification settings - Fork 4
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
nlc with npm-prefix no such file or directory #8
Comments
Firstly, are you sure your [linked package] is actually npm-linked, i.e. have you run Second, have you set a custom prefix-path in your And how about other commands: npm-link-save, and npm-link-quick, are those working as expected or are you getting the same error with them too? |
Thanks I missed the relationship between global-modules & global prefix libraries. Yes I'm definitely linking before calling nlc. In this scenario I'm using hosted build agents provided by Azure DevOps. In the past the npm config on agent images was setup with this script - https://github.com/microsoft/azure-pipelines-image-generation/blob/83eb28f760cb8ecd808eb9f6f740a854398ebb99/images/win/scripts/Installers/Install-NodeLts.ps1 $PrefixPath = 'C:\npm\prefix' New-Item -Path $PrefixPath -Force -ItemType Directory choco install nodejs-lts -y --force Add-MachinePathItem $PrefixPath setx NPM_CONFIG_PREFIX $PrefixPath /M setx NPM_CONFIG_CACHE $CachePath /M npm config set registry http://registry.npmjs.org/ Thanks |
Ah, I see the problem. You're using the environment variable Actually I notice it reads the env var Or I'll see if I can/should implement getting prefix-path on my own in this library itself. Simply getting it via |
Did just that 29dcbb4. Published v0.5.0 That should fix this. Please reopen if not. |
awsome will test |
This is a really good library, I use it regularly, its awesome!!!. |
Hi,
This is a useful tool, I'm currently running into an issue with the tool around npm prefixes
when running
nlc [linked package]
I get the following error-
Error: ENOENT: no such file or directory, stat 'C:\Users\VssAdministrator\AppData\Roaming\npm\node_modules[linked package]'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
The link was successfully created
npm WARN [linked package]@1.0.0 No description
npm WARN [linked package]@1.0.0 No repository field.
audited 84 packages in 0.838s
3 packages are looking for funding
run
npm fund
for detailsfound 0 vulnerabilities
C:\npm\prefix\node_modules[linked package] -> D:\a\1\s\libs[linked package]
am running this on a build agent which seems to have a global prefix defined, , If I configure the same scenario on my local dev machine I get the same error.
Many Thanks
Gareth
The text was updated successfully, but these errors were encountered: