Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Exit status 3221225477 returned from node scripts/build.js / Windows XP #1283

Closed
ghost opened this issue Nov 24, 2015 · 38 comments
Closed

Exit status 3221225477 returned from node scripts/build.js / Windows XP #1283

ghost opened this issue Nov 24, 2015 · 38 comments

Comments

@ghost
Copy link

ghost commented Nov 24, 2015

Windows XP after update node.js to 5 version trying to install grunt-sass

npm debug log

"devDependencies": {
"autoprefixer-core": "^5.2.1",
"grunt": "^0.4.5",
"grunt-browser-sync": "2.1.3",
"grunt-cli": "0.1.13",
"grunt-combine-media-queries": "1.0.19",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-imagemin": "1.0.0",
"grunt-contrib-watch": "0.6.1",
"grunt-csscomb": "3.0.1",
"grunt-newer": "1.1.1",
"grunt-notify": "0.4.1",
"grunt-pngmin": "1.0.2",
"grunt-postcss": "^0.5.5",
"grunt-sass": "1.1.0",
"grunt-sftp-deploy": "0.2.4",
"grunt-svg2string": "0.1.6",
"grunt-svgmin": "^2.0.1",
"grunt-svgstore": "0.5.0",
"load-grunt-tasks": "3.2.0"
}

17930 warn EPACKAGEJSON [email protected] No description
17931 warn EPACKAGEJSON [email protected] No repository field.
17932 warn EPACKAGEJSON [email protected] No license field.
17933 verbose stack Error: [email protected] postinstall: node scripts/build.js
17933 verbose stack Exit status 3221225477
17933 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:233:16)
17933 verbose stack at emitTwo (events.js:87:13)
17933 verbose stack at EventEmitter.emit (events.js:172:7)
17933 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
17933 verbose stack at emitTwo (events.js:87:13)
17933 verbose stack at ChildProcess.emit (events.js:172:7)
17933 verbose stack at maybeClose (internal/child_process.js:818:16)
17933 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
17934 verbose pkgid [email protected]
17935 verbose cwd E:\ProxySocks\markup
17936 error Windows_NT 5.1.2600
17937 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-sass"
17938 error node v5.0.0
17939 error npm v3.3.6
17940 error code ELIFECYCLE
17941 error [email protected] postinstall: node scripts/build.js
17941 error Exit status 3221225477
17942 error Failed at the [email protected] postinstall script 'node scripts/build.js'.
17942 error This is most likely a problem with the node-sass package,
17942 error not with npm itself.
17942 error Tell the author that this fails on your system:
17942 error node scripts/build.js
17942 error You can get their info via:
17942 error npm owner ls node-sass
17942 error There is likely additional logging output above.
17943 verbose exit [ 1, true ]

@xzyfer
Copy link
Contributor

xzyfer commented Dec 27, 2015

Suspect lines

17916 silly postinstall node-sass E:\ProxySocks\markup\node_modules\.staging\node-sass-3af3a5a978447f28c3a4d0ae9f12bac5
17917 info lifecycle [email protected]~postinstall: [email protected]
17918 verbose lifecycle [email protected]~postinstall: unsafe-perm in lifecycle true
17919 verbose lifecycle [email protected]~postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;E:\ProxySocks\markup\node_modules\node-sass\node_modules\.bin;E:\ProxySocks\markup\node_modules\.bin;C:\Program Files\Git\git-cheetah\..\bin;C:\Program Files\Git\git-cheetah\..\bin;C:\Ruby193\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Common Files\Symbian\tools;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Support Tools\;C:\Program Files\Skype\Phone\;C:\Program Files\nodejs\;D:\ruby-git-nodejs\git-1.9.4\cmd;D:\ruby-git-nodejs\nodejs;D:\ruby-git-nodejs\phantomjs-1.9.7;D:\ruby-git-nodejs\ruby-2.1.3-x32\bin;C:\Documents;C:\Documents and Settings\Des\Application Data\npm
17920 verbose lifecycle [email protected]~postinstall: CWD: E:\ProxySocks\markup\node_modules\node-sass
17921 silly lifecycle [email protected]~postinstall: Args: [ '/d /s /c', 'node scripts/build.js' ]
17922 silly lifecycle [email protected]~postinstall: Returned: code: 3221225477  signal: null
17923 info lifecycle [email protected]~postinstall: Failed to exec postinstall script

Followed by

17924 verbose unlock done using C:\Documents and Settings\Des\Application Data\npm-cache\_locks\staging-b10dc221cdadd1a7.lock for E:\ProxySocks\markup\node_modules\.staging
17925 silly rollbackFailedOptional Starting
17926 silly rollbackFailedOptional Finishing
17927 silly runTopLevelLifecycles Starting
17928 silly runTopLevelLifecycles Finishing
17929 silly install printInstalled
17930 warn EPACKAGEJSON [email protected] No description
17931 warn EPACKAGEJSON [email protected] No repository field.
17932 warn EPACKAGEJSON [email protected] No license field.
17933 verbose stack Error: [email protected] postinstall: `node scripts/build.js`
17933 verbose stack Exit status 3221225477
17933 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:233:16)
17933 verbose stack     at emitTwo (events.js:87:13)
17933 verbose stack     at EventEmitter.emit (events.js:172:7)
17933 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
17933 verbose stack     at emitTwo (events.js:87:13)
17933 verbose stack     at ChildProcess.emit (events.js:172:7)
17933 verbose stack     at maybeClose (internal/child_process.js:818:16)
17933 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
17934 verbose pkgid [email protected]
17935 verbose cwd E:\ProxySocks\markup
17936 error Windows_NT 5.1.2600
17937 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sass"
17938 error node v5.0.0
17939 error npm  v3.3.6
17940 error code ELIFECYCLE
17941 error [email protected] postinstall: `node scripts/build.js`
17941 error Exit status 3221225477
17942 error Failed at the [email protected] postinstall script 'node scripts/build.js'.
17942 error This is most likely a problem with the node-sass package,
17942 error not with npm itself.
17942 error Tell the author that this fails on your system:
17942 error     node scripts/build.js
17942 error You can get their info via:
17942 error     npm owner ls node-sass
17942 error There is likely additional logging output above.
17943 verbose exit [ 1, true ]

@saper
Copy link
Member

saper commented Dec 27, 2015

This is Windows error code C0000005 or ACCESS_VIOLATION, which may indicate some problem in node or npm. It may be related to the system permissions. It is pretty unlikely it's something node-sass can fix.

@saper
Copy link
Member

saper commented Dec 27, 2015

You can see what happens from the Windows command line if you run

cmd /d /s /c node

Do you get a node prompt there?

@JamesVanWaza
Copy link

@FrontEndMonster Delete autoprefixer-core and use autoprefixer

@saper
Copy link
Member

saper commented Jan 4, 2016

Filed npm/npm#11024 with the npm project.

@saper saper changed the title Npm module grunt-sass not found problem with the node-sass package Exit status 3221225477 returned from node scripts/build.js / Windows XP Jan 6, 2016
@saper
Copy link
Member

saper commented Jan 6, 2016

report Windows_NT node npm
@frontendmonster 5.1.2600 5.0.0 3.3.6
@vzdeadler 5.1.2600 4.2.4 2.14.12
@Mohit127 5.1.2600 4.2.4 3.5.2

So it's all fairly recent node on Windows XP

@saper
Copy link
Member

saper commented Jan 6, 2016

Interesting piece from node:

https://github.com/nodejs/node/blob/842e5a10ac59c826f875ef79e92d144e2655cc9a/test/common.js#L502-L505

  // On Windows, v8's base::OS::Abort triggers an access violation,
  // which corresponds to exit code 3221225477 (0xC0000005)
  if (process.platform === 'win32')
    expectedExitCodes = [3221225477];

so it looks like it's a V8's special case

@saper
Copy link
Member

saper commented Jan 6, 2016

Everyone: does downgrade of node fix this for you? Which node versions were you using before (when node-sass installation was working)?

@saper saper self-assigned this Jan 6, 2016
@saper
Copy link
Member

saper commented Jan 6, 2016

So, it is perfectly reproducible with any node engine on Windows XP. node-sass 3.4.1 works, node-sass 3.4.2 is broken. Actually the binary gets downloaded fine, but we cannot load the module.

My guess would be it got broken either by 901f411 (switching to VS2015) or by libsass update (or both).

@saper
Copy link
Member

saper commented Jan 6, 2016

We crash in the node_module_register() function. Node is using VS2013 to build.

@mcdevlog
Copy link

mcdevlog commented Jan 7, 2016

Using older version of node on other computer, though the OS is Win 8. It works fine there.

When i run

cmd /d /s /c node
nodesasserror2

@xzyfer
Copy link
Contributor

xzyfer commented Jan 7, 2016

@saper incredible work. We've been looking for a justification for support VS2013. I wonder if using a binary compiled on VS2013 will resolve the issue.

/cc @am11 @mgreter

@saper
Copy link
Member

saper commented Jan 7, 2016

I am 99.99% certain it will, I'd love to roll out emergency release with vs2013. It will take time for me to figure out why exactly this happens (if ever).

@saper
Copy link
Member

saper commented Jan 7, 2016

Thanks @Mohit127 . We are currently pretty sure it happens always on XP and only with node-sass 3.4.2. Using node-sass 3.4.1 does not cause a problem.

it may cause problems on other Windows versions.

@am11
Copy link
Contributor

am11 commented Jan 7, 2016

PlatformToolSet is not setting correctly for VS2015. So change 'msbuild_toolset' to 'v140_xp' in ~/.node-gyp/common.gypi file. Then compiling with VS2015 will fix this issue for Windows XP.
Alternatively, open build/binding.sln in VS, rightclick binding project > Properties and set Platform Toolset to Visual Studio 2015 - Windows XP (v140_xp). The goal is to replace this line: <PlatformToolset>v140</PlatformToolset> with <PlatformToolset>v140_xp</PlatformToolset> in build/binding.vcxproj file.

@saper
Copy link
Member

saper commented Jan 7, 2016

That should probably be v120 or v120_xp (who knows?) We can propose to add this to node, in the meantime I think we should go back to VS2013.

@xzyfer
Copy link
Contributor

xzyfer commented Jan 7, 2016

LibSass currently cannot compile with vs2013.
On 7 Jan 2016 8:25 pm, "Marcin Cieślak" [email protected] wrote:

That should probably be v120 or v120_xp (who knows?) We can propose to
add this to node, in the meantime I think we should go back to VS2013.


Reply to this email directly or view it on GitHub
#1283 (comment).

@am11
Copy link
Contributor

am11 commented Jan 7, 2016

@saper, it should be v140_xp. I know :)

@saper saper removed their assignment Jan 7, 2016
@saper
Copy link
Member

saper commented Jan 20, 2016

@xzyfer #1352 is there to fix this.

am11 added a commit to am11/node-sass that referenced this issue Jan 20, 2016
@am11
Copy link
Contributor

am11 commented Jan 20, 2016

Thank you all for contributing.
This issue is fixed for next release.
Thanks @saper!

@xzyfer xzyfer modified the milestone: next.patch Sep 4, 2016
mcampa pushed a commit to mcampa/node-sass that referenced this issue Apr 21, 2017
@DanielWLam
Copy link

+1, come from create-reate-app @am11

@matbrgz

This comment has been minimized.

@matbrgz

This comment has been minimized.

@xzyfer

This comment has been minimized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants