Windows Subsystem Linux usage
See original GitHub issuenetlify-shortener
version:1.0.3node
version:10.14.2npm
(oryarn
) version:6.4.1
Relevant code or config
What you did: tried to run shorten
for the npm script netlify-shortener
What happened: got the following error output:
/m/c/U/s/g/netlify-short-urls ⎇ feat/use-netlify-shortner ○
❯ nr shorten ⬢ v10.14.2
> netlify-short-urls@1.0.0 shorten /mnt/c/Users/spenc/gitrepos/netlify-short-urls
> netlify-shortener
committing: format links
On branch feat/use-netlify-shortner
Your branch is up to date with 'origin/feat/use-netlify-shortner'.
nothing to commit, working tree clean
pushing
Everything up-to-date
/mnt/c/Users/spenc/gitrepos/netlify-short-urls/node_modules/clipboardy/lib/linux.js:10
throw err;
^
Error: xsel: Can't open display: (null)
: Inappropriate ioctl for device
at Function.module.exports.sync (/mnt/c/Users/spenc/gitrepos/netlify-short-urls/node_modules/execa/index.js:303:26)
at Object.copySync (/mnt/c/Users/spenc/gitrepos/netlify-short-urls/node_modules/clipboardy/lib/linux.js:31:18)
at Object.exports.writeSync.input [as writeSync] (/mnt/c/Users/spenc/gitrepos/netlify-short-urls/node_modules/clipboardy/index.js:38:13)
at Object.<anonymous> (/mnt/c/Users/spenc/gitrepos/netlify-short-urls/node_modules/netlify-shortener/dist/index.js:46:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! netlify-short-urls@1.0.0 shorten: `netlify-shortener`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the netlify-short-urls@1.0.0 shorten script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/scott/.npm/_logs/2019-01-04T08_19_08_897Z-debug.log
/m/c/U/s/g/netlify-short-urls ⎇ feat/use-netlify-shortner ○
Reproduction repository: spences10/netlify-short-urls
Problem description: I’m using WSL so not sure if that is an issue or the fact that I’m on a feature branch and not master
Suggested solution: looking into CD settings on netlify now
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
The Ultimate Guide to Windows Subsystem for Linux ...
Learn how to natively work within Linux on Windows 10 with Windows Subsystem for Linux (WSL in Windows) in this HUGE guide!
Read more >Get started with the Windows Subsystem for Linux - Training
Enable the Windows Subsystem for Linux on your Windows device. · Install a Linux distribution. · Use Linux commands and work across Windows...
Read more >What is Windows Subsystem for Linux | Microsoft Learn
The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, ...
Read more >Basic commands for WSL | Microsoft Learn
Install WSL and the default Ubuntu distribution of Linux. Learn more. You can also use this command to install additional Linux distributions by ......
Read more >Fun with the Windows Subsystem for Linux
At Build 2016, Microsoft introduced to the world the Windows Subsystem for Linux (Beta) [WSL], which enables developers to run native Ubuntu ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Changing the index.js to this made it work on WSL:
It’s an issue with WSL itself. There are some (weird) solutions though:
It seems
cat filepath | clip.exe
is the easiest one.