node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

Cannot install [email protected] on Windows 10 using node 10.13.0 and npm 6.4.1

Open donaldallen opened this issue 8 years ago • 8 comments

Using Windows 10 17134, elevated PowerShell. I cannot install node-sass for the life of me. I've uninstalled node, removed all related environment variables, restarted, no luck. The example below is a git clone of the bootstrap 4 github.

PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> npm -v
6.4.1
PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> node -v
v10.13.0
PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> node -p process.versions
{ http_parser: '2.8.0',
  node: '10.13.0',
  v8: '6.8.275.32-node.36',
  uv: '1.23.2',
  zlib: '1.2.11',
  ares: '1.14.0',
  modules: '64',
  nghttp2: '1.34.0',
  napi: '3',
  openssl: '1.1.0i',
  icu: '62.1',
  unicode: '11.0',
  cldr: '33.1',
  tz: '2018e' }
PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> node -p process.platform
win32
PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> node -p "require('node-sass').info"
internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module 'node-sass'

PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> npm ls node-sass
[email protected] C:\Users\DonAllen\Desktop\BS TEST\bootstrap
`-- (empty)

PS C:\Users\DonAllen\Desktop\BS TEST\bootstrap> npm install --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session 8fac2d998b182e39
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing stage:loadCurrentTree Completed in 1649ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 11ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 843ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 887ms
npm timing stage:loadIdealTree Completed in 2189ms
npm timing stage:generateActionsToTake Completed in 102ms
npm verb correctMkdir C:\Users\DonAllen\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm verb lock using C:\Users\DonAllen\AppData\Roaming\npm-cache\_locks\staging-6c73b64591530a62.lock for C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\.staging
npm timing audit compress Completed in 255ms
npm info audit Submitting payload of 78627bytes
npm timing audit submit Completed in 528ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 528ms
npm timing audit body Completed in 1ms
npm timing action:extract Completed in 926ms
npm timing action:finalize Completed in 213ms
npm timing action:refresh-package-json Completed in 312ms
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 75ms
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm verb linkBins [ { 'in-publish': 'in-publish.js',
npm verb linkBins     'in-install': 'in-install.js',
npm verb linkBins     'not-in-publish': 'not-in-publish.js',
npm verb linkBins     'not-in-install': 'not-in-install.js' },
npm verb linkBins   'C:\\Users\\DonAllen\\Desktop\\BS TEST\\bootstrap\\node_modules\\.bin',
npm verb linkBins   false ]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm verb linkBins [ { semver: './bin/semver' },
npm verb linkBins   'C:\\Users\\DonAllen\\Desktop\\BS TEST\\bootstrap\\node_modules\\node-gyp\\node_modules\\.bin',
npm verb linkBins   false ]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm verb linkBins [ { sassgraph: 'bin/sassgraph' },
npm verb linkBins   'C:\\Users\\DonAllen\\Desktop\\BS TEST\\bootstrap\\node_modules\\.bin',
npm verb linkBins   false ]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm verb linkBins [ { 'strip-indent': 'cli.js' },
npm verb linkBins   'C:\\Users\\DonAllen\\Desktop\\BS TEST\\bootstrap\\node_modules\\.bin',
npm verb linkBins   false ]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm verb linkBins [ { 'node-gyp': './bin/node-gyp.js' },
npm verb linkBins   'C:\\Users\\DonAllen\\Desktop\\BS TEST\\bootstrap\\node_modules\\.bin',
npm verb linkBins   false ]
npm info linkStuff [email protected]
npm verb linkBins [ { 'node-sass': 'bin/node-sass' },
npm verb linkBins   'C:\\Users\\DonAllen\\Desktop\\BS TEST\\bootstrap\\node_modules\\.bin',
npm verb linkBins   false ]
npm timing action:build Completed in 138ms
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]

> [email protected] install C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\node-sass
> node scripts/install.js

/bin/bash: node: command not found
npm verb lifecycle [email protected]~install: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~install: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\node-sass\node_modules\.bin;C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\.bin;C:\Program Files\nodejs;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Boxstarter;C:\Program Files (x86)\PHP\v7.1;C:\WINDOWS\system32\inetsrv;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files (x86)\Python36-32\Scripts\;C:\Program Files (x86)\Python36-32\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsof;C:\Program Files (x86)\MySQL\MySQL Utilities 1.6\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\GitExtensions\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\PuTTY\;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\LINQPad5;C:\tools\php71;C:\Users\DonAllen\scoop\shims;C:\Ruby23-x64\bin;C:\Users\DonAllen\AppData\Local\Microsoft\WindowsApps;C:\tools\gittfs;C:\Program Files\kdiff3;C:\Users\DonAllen\AppData\Roaming\Composer\vendor\bin;C:\Program Files (x86)\Nmap;C:\Users\DonAllen\AppData\Local\hyper\app-2.0.0\resources\bin;C:\Users\DonAllen\.dotnet\tools;C:\Users\DonAllen\AppData\Local\Microsoft\WindowsApps;C:\Users\DonAllen\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\DonAllen\AppData\Roaming\npm
npm verb lifecycle [email protected]~install: CWD: C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\node-sass
npm info lifecycle [email protected]~install: Failed to exec install script
npm timing action:install Completed in 373ms
npm verb unlock done using C:\Users\DonAllen\AppData\Roaming\npm-cache\_locks\staging-6c73b64591530a62.lock for C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\.staging
npm timing stage:rollbackFailedOptional Completed in 258ms
npm timing stage:runTopLevelLifecycles Completed in 6578ms
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64

npm verb stack Error: [email protected] install: `node scripts/install.js`
npm verb stack spawn ENOENT
npm verb stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:48:18)
npm verb stack     at ChildProcess.emit (events.js:182:13)
npm verb stack     at maybeClose (internal/child_process.js:962:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
npm verb pkgid [email protected]
npm verb cwd C:\Users\DonAllen\Desktop\BS TEST\bootstrap
npm verb Windows_NT 10.0.17134
npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--verbose"
npm verb node v10.13.0
npm verb npm  v6.4.1
npm ERR! file bash
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 7577ms

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DonAllen\AppData\Roaming\npm-cache\_logs\2018-10-30T18_08_55_299Z-debug.log

The important details are here:

> [email protected] install C:\Users\DonAllen\Desktop\BS TEST\bootstrap\node_modules\node-sass
> node scripts/install.js

/bin/bash: node: command not found

Is it normal for /bin/bash to try to run when installing node-sass?

donaldallen avatar Oct 30 '18 18:10 donaldallen

Does it work from a regular command prompt or non-Admin shell?

nschonni avatar Oct 31 '18 01:10 nschonni

related - I can't install node-sass 4.9.2 using node 11.1.0 and npm 4.0.5

Vandivier avatar Nov 05 '18 22:11 Vandivier

Node 11 requires [email protected]

On Tue., 6 Nov. 2018, 9:00 am John Vandivier <[email protected] wrote:

related - I can't install node-sass 4.9.2 using node 11.1.0 and npm 4.0.5

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sass/node-sass/issues/2528#issuecomment-436051393, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjZWCRFKnJ7q_GLQv-gBQJKTQFJR_C4ks5usLTngaJpZM4YCjK0 .

xzyfer avatar Nov 05 '18 22:11 xzyfer

Does it work from a regular command prompt or non-Admin shell?

@nschonni I'm just coming back to this now. I've tried both command prompt and non-Admin PowerShell.

PS C:\Users\DonAllen\Desktop\installtest> npm install

> [email protected] install C:\Users\DonAllen\Desktop\installtest\node_modules\node-sass
> node scripts/install.js

/bin/bash: node: command not found
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! file bash
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install 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!     C:\Users\DonAllen\AppData\Roaming\npm-cache\_logs\2018-11-08T19_47_25_964Z-debug.log
PS C:\Users\DonAllen\Desktop\installtest>

I also updated node-sass to 4.10.0, same results:

PS C:\Users\DonAllen\Desktop\installtest> npm install

> [email protected] install C:\Users\DonAllen\Desktop\installtest\node_modules\node-sass
> node scripts/install.js

/bin/bash: node: command not found
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! file bash
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install 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!     C:\Users\DonAllen\AppData\Roaming\npm-cache\_logs\2018-11-08T19_49_27_873Z-debug.log
PS C:\Users\DonAllen\Desktop\installtest>

Also, I tried installing with Yarn. When I install, I get no errors at all. However, when I try to run a script that uses node-sass like below, I get the bin/bash error:

PS D:\dev\TEST.CMS\LAO.CMS\ResourcePackages\TEST> yarn run css-compile
yarn run v1.12.3
$ .\node_modules\.bin\node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/src/scss/main.scss assets/dist/css/main.css
/bin/bash: /d: No such file or directory
error Command failed with exit code 127.

donaldallen avatar Nov 08 '18 19:11 donaldallen

Okay, I think I'm on to something, but since it seems unrelated to node-sass, I might have to do some digging elsewhere.

Basically, when I run node-sass from the command line, it works:

PS D:\dev\TEST.CMS\TEST.CMS\ResourcePackages\TEST> .\node_modules\.bin\node-sass --output-style expanded --source-map true
--source-map-contents true --precision 6 assets/src/scss/main.scss assets/dist/css/main.css
Rendering Complete, saving .css file...
Wrote CSS to D:\dev\TEST.CMS\TEST.CMS\ResourcePackages\TEST\assets\dist\css\main.css
Wrote Source Map to D:\dev\TEST.CMS\TEST.CMS\ResourcePackages\TEST\assets\dist\css\main.css.map

However, when I run my npm script task:

"css-compile": ".\\node_modules\\.bin\\node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/src/scss/main.scss assets/dist/css/main.css"

I get this:

PS D:\dev\LAO.CMS\LAO.CMS\ResourcePackages\LAO> yarn run css-compile
yarn run v1.12.3
$ node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/src/scss/main.scss assets/dist/css/main.css
/bin/bash: /d: No such file or directory
error Command failed with exit code 127.

So it must not be finding node-sass from where I'm running the command, which is just in the same folder that has node_modules.

donaldallen avatar Nov 08 '18 20:11 donaldallen

Thanks for investigating @donaldallen. It sounds like this isn't node-sass specific. I'm closing this as it appears to be out of our control.

xzyfer avatar Nov 11 '18 02:11 xzyfer

I'm having the same issue with my Angular 7 application. It seems that I can't get the proper writing access, when it wants to make a new directory.

$ node -v
v11.8.0

$ npm -v
6.5.0

The error output is the following:

$ sudo npm install [email protected]
> [email protected] install /home/pi/apps/site.manager/site.web/node_modules/node-sass
> node scripts/install.js

Unable to save binary /home/pi/apps/site.manager/site.web/node_modules/node-sass/vendor/linux-arm-67 : { Error: EACCES: permission denied, mkdir '/home/pi/apps/site.manager/site.web/node_modules/node-sass/vendor'
    at Object.mkdirSync (fs.js:774:3)
    at sync (/home/pi/apps/site.manager/site.web/node_modules/mkdirp/index.js:71:13)
    at Function.sync (/home/pi/apps/site.manager/site.web/node_modules/mkdirp/index.js:77:24)
    at checkAndDownloadBinary (/home/pi/apps/site.manager/site.web/node_modules/node-sass/scripts/install.js:114:11)
    at Object.<anonymous> (/home/pi/apps/site.manager/site.web/node_modules/node-sass/scripts/install.js:157:1)
    at Module._compile (internal/modules/cjs/loader.js:736:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:568:12)
    at Function.Module._load (internal/modules/cjs/loader.js:560:3)
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path:
   '/home/pi/apps/site.manager/site.web/node_modules/node-sass/vendor' }

> [email protected] postinstall /home/pi/apps/site.manager/site.web/node_modules/node-sass
> node scripts/build.js

Building: /usr/bin/node /home/pi/apps/site.manager/site.web/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli   '/home/pi/apps/site.manager/site.web/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.13
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 11.8.0
gyp verb command install [ '11.8.0' ]
gyp verb install input version string "11.8.0"
gyp verb install installing version: 11.8.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/11.8.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/apps/site.manager/site.web/node_modules/node-sass/.node-gyp"
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '--node_gyp_internal_noretry', '11.8.0' ]
gyp verb install input version string "11.8.0"
gyp verb install installing version: 11.8.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 11.8.0
gyp verb ensuring nodedir is created /home/pi/apps/site.manager/site.web/node_modules/node-sass/.node-gyp/11.8.0
gyp WARN install got an error, rolling back install
gyp verb command remove [ '11.8.0' ]
gyp verb remove using node-gyp dir: /home/pi/apps/site.manager/site.web/node_modules/node-sass/.node-gyp
gyp verb remove removing target version: 11.8.0
gyp verb remove removing development files for version: 11.8.0
gyp WARN install got an error, rolling back install
gyp verb command remove [ '11.8.0' ]
gyp verb remove using node-gyp dir: /home/pi/apps/site.manager/site.web/node_modules/node-sass/.node-gyp
gyp verb remove removing target version: 11.8.0
gyp verb remove removing development files for version: 11.8.0
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/apps/site.manager/site.web/node_modules/node-sass/.node-gyp'
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/bin/node" "/home/pi/apps/site.manager/site.web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/pi/apps/site.manager/site.web/node_modules/node-sass
gyp ERR! node -v v11.8.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of rxjs@^5.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.6 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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!     /root/.npm/_logs/2019-01-29T04_29_11_244Z-debug.log

slimcdk avatar Jan 29 '19 04:01 slimcdk

Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

moelzanaty3 avatar Jun 11 '19 08:06 moelzanaty3