Closed Pikachews closed 6 years ago
I have got the same issue. Could someone please help me resolve the problem. I think there is some issue with the spwan method.
Specifiying the shell as explicitly as node ( { shell: "node" } ) and passing it as the thrid parameter to spwanSync Resolved the issue. Now I can build it on Windows without any issues !
const files = spawnSync('grep', ['-ril', versionPlaceholderText, packageDir], { shell: "node" }).stdout
The errors seem to originate from a different place now:
[14:35:39] TypeError: Cannot read property 'toString' of null
at D:\Stuff\Projects\angular\material2\tools\package-tools\secondary-entry-points.ts:42:13
at Array.forEach (native)
at Object.getSecondaryEntryPointsForPackage (D:\Stuff\Projects\angular\material2\tools\package-tools\secondary-entry-points.ts:38:14)
at BuildPackage.get [as secondaryEntryPoints] (D:\Stuff\Projects\angular\material2\tools\package-tools\build-package.ts:36:36)
at BuildPackage.<anonymous> (D:\Stuff\Projects\angular\material2\tools\package-tools\build-package.ts:59:34)
at step (D:\Stuff\Projects\angular\material2\tools\package-tools\build-package.ts:32:23)
at Object.next (D:\Stuff\Projects\angular\material2\tools\package-tools\build-package.ts:13:53)
at fulfilled (D:\Stuff\Projects\angular\material2\tools\package-tools\build-package.ts:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
@Pikachews For developers on Windows that have the Git Bash installed, the issue should be fixed with https://github.com/angular/material2/commit/509e3e90f5ad985099342d587f6c703ef4406cea
For people without Git Bash, I'm planning on creating a new query that works for Windows as well (sometime soon)
It works when do an 'npm run *' from The Git Bash
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Should be able to build on Windows
What is the current behavior?
Can't build package on windows
I get a bunch of this error repeatedly:
I would assume it has something to do with windows not having grep, considering line 18 of version-placeholders.ts
What is the use-case or motivation for changing an existing behavior?
Wish to be able to build on windows
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular/material2@master