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

it doesn't work on windows #151

Closed
SPAHI4 opened this issue Oct 14, 2017 · 6 comments
Closed

it doesn't work on windows #151

SPAHI4 opened this issue Oct 14, 2017 · 6 comments

Comments

@SPAHI4
Copy link

SPAHI4 commented Oct 14, 2017

Error: \\?\C:\Users\spahi4\WebstormProjects\app\node_modules\@react-pdf\core\bin\8\nbind.node is not a valid Win32 application\\?\C:\Users\spahi4\WebstormProjects\app\node_modules\@react-pdf\core\bin\8\nbind.node
    at Object.Module._extensions..node (module.js:653:18)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at initNode (C:\Users\spahi4\WebstormProjects\app\node_modules\nbind\dist\nbind.js:141:15)
    at C:\Users\spahi4\WebstormProjects\app\node_modules\nbind\dist\nbind.js:115:13
    at findCompiledModule (C:\Users\spahi4\WebstormProjects\app\node_modules\nbind\dist\nbind.js:79:13)
    at find (C:\Users\spahi4\WebstormProjects\app\node_modules\nbind\dist\nbind.js:93:13)
    at Object.init (C:\Users\spahi4\WebstormProjects\app\node_modules\nbind\dist\nbind.js:104:5)
    at Object.<anonymous> (C:\Users\spahi4\WebstormProjects\app\node_modules\@react-pdf\core\bin\index.js:4:19)
    at Module._compile (module.js:624:30)
    at Module._extensions..js (module.js:635:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\spahi4\WebstormProjects\app\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:545:32)
  "dependencies": {
    "@react-pdf/core": "^0.4.6",
    "@react-pdf/dom": "^0.4.6",
    "@react-pdf/node": "^0.4.6",

nodejs 8.7.0, yarn 1.2.0, windows 10 x64

@plainnany
Copy link

Hi, I have this problem too, when I run yarn example -- resume , I got errors

yarn run v1.3.2
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forw
arded. In a future version, any explicit "--" will be forwarded as-is to the scr
ipts.
$ babel-node ./examples/index.js resume
Running the resume example
Error: %1 is not a valid Win32 application.
\\?\C:\Users\楠\Desktop\react-pdf\packages\react-pdf\bin\6\nbind.node
    at Error (native)
    at Object.Module._extensions..node (module.js:583:18)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at initNode (C:\Users\楠\Desktop\react-pdf\packages\react-pdf\node_modules\n
bind\dist\nbind.js:141:15)
    at C:\Users\楠\Desktop\react-pdf\packages\react-pdf\node_modules\nbind\dist\
nbind.js:115:13
    at findCompiledModule (C:\Users\楠\Desktop\react-pdf\packages\react-pdf\node
_modules\nbind\dist\nbind.js:79:13)
Done in 3.20s.

Is there any solutions now?
thanks a lot

@diegomura
Copy link
Owner

@SPAHI4 @plainnany can you test again?

@georgiosd
Copy link

I'm getting this :(

~\Desktop\pdf-kelvin> yarn add @react-pdf/core @react-pdf/dom
yarn add v0.17.10
info No lockfile found.
[1/4] Resolving packages...
warning @react-pdf/core > pdfkit > linebreak > brfs > static-module > through2 > xtend > object-keys@0.4.0:
[2/4] Fetching packages...
warning fsevents@1.1.2: The platform "win32" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/3] ⠂ waiting...
[-/3] ⠂ waiting...
[3/3] ⠄ yoga-layout: C:\Users\Georgios\AppData\Roaming\npm-cache\_logs\2018-01-30T06_02_22_520Z-debug.log
[-/3] ⠄ waiting...
error C:\Users\Georgios\Desktop\pdf-kelvin\node_modules\yoga-layout: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c npm run build:node
Directory: C:\Users\Georgios\Desktop\pdf-kelvin\node_modules\yoga-layout
Output:
> yoga-layout@1.9.0 build:node C:\Users\Georgios\Desktop\pdf-kelvin\node_modules\yoga-layout
> npm run copy-sources && autogypi && node-gyp configure build


> yoga-layout@1.9.0 copy-sources C:\Users\Georgios\Desktop\pdf-kelvin\node_modules\yoga-layout
> ! npm -s run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)

'!' is not recognized as an internal or external command,
operable program or batch file.
'rsync' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yoga-layout@1.9.0 copy-sources: `! npm -s run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/y
oga/)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yoga-layout@1.9.0 copy-sources 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\Georgios\AppData\Roaming\npm-cache\_logs\2018-01-30T06_02_22_499Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yoga-layout@1.9.0 build:node: `npm run copy-sources && autogypi && node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yoga-layout@1.9.0 build:node 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\Georgios\AppData\Roaming\npm-cache\_logs\2018-01-30T06_02_22_520Z-debug.log
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@semiautomatix
Copy link

Still not fixed - will have to move to generation on the server

@semiautomatix
Copy link

semiautomatix commented Feb 20, 2018

C:\react-project>yarn add @react-pdf/core @react-pdf/node @react-pdf/dom
yarn add v1.3.2
$ npm run npmcheckversion

> react-boilerplate@3.5.0 npmcheckversion C:\react-project
> node ./internals/scripts/npmcheckversion.js

[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.1.3: The platform "win32" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > material-ui-pickers@1.0.0-beta.15.1" has unmet peer dependency "classnames@^2.2.5".
warning "stylelint > postcss-html@0.11.0" has unmet peer dependency "postcss-sass@>=0.2.0".
warning "stylelint-processor-styled-components > typescript-eslint-parser@9.0.1" has unmet peer dependency "typescript@*".
[5/5] Building fresh packages...
[-/2] ⠁ waiting...
[2/2] ⠁ yoga-layout: > npm -- run copy-sources && npm -- run node-gyp configure build
[-/2] ⠁ waiting...
[-/2] ⠁ waiting...
error C:\react-project\node_modules\yoga-layout: Command failed.
Exit code: 1
Command: npm -- run autogypi && npm -- run build:node
Arguments:
Directory: C:\react-project\node_modules\yoga-layout
Output:
> yoga-layout@1.6.0 autogypi C:\react-project\node_modules\yoga-layout
> autogypi


> yoga-layout@1.6.0 build:node C:\react-project\node_modules\yoga-layout
> npm -- run copy-sources && npm -- run node-gyp configure build


> yoga-layout@1.6.0 copy-sources C:\react-project\node_modules\yoga-layout
> ! npm -s -- run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)

'!' is not recognized as an internal or external command,
operable program or batch file.
'rsync' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yoga-layout@1.6.0 copy-sources: `! npm -s -- run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yoga-layout@1.6.0 copy-sources 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\Tim\AppData\Roaming\npm-cache\_logs\2018-02-20T09_59_42_501Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yoga-layout@1.6.0 build:node: `npm -- run copy-sources && npm -- run node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yoga-layout@1.6.0 build:node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@rogierslag
Copy link
Contributor

This is not specific to react-pdf, but there is an open issue in yoga-layout

You can try the Linux subsystem for Windows

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

No branches or pull requests

6 participants