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

Fix windows Calypso Boot #19084

Closed
wants to merge 1 commit into from
Closed

Fix windows Calypso Boot #19084

wants to merge 1 commit into from

Conversation

withinboredom
Copy link
Contributor

Fixes: #19073

In windows the poststart script tries to execute two scripts:

%HOME%\Source\Repos\wp-calypso\%NODE_ARGS% and %HOME%\Source\Repos\wp-calypso\build\bundle.js

The first one, naturally, doesn't exist, which causes the build to fail with an ENOENT.

Is there a more platform agnostic way to pass $NODE_ARGS to the child process?

@withinboredom withinboredom added Build [Pri] High [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Bug labels Oct 23, 2017
@withinboredom withinboredom self-assigned this Oct 23, 2017
@matticbot
Copy link
Contributor

@Viper007Bond
Copy link
Contributor

I ran npm start via Bash (Windows Subsystem for Linux) and got an error:

npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.11.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! wp-calypso@0.17.0 prestart: `npm run -s install-if-deps-outdated && node bin/welcome.js && ( check-node-version --package || exit 0 )`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wp-calypso@0.17.0 prestart script 'npm run -s install-if-deps-outdated && node bin/welcome.js && ( check-node-version --package || exit 0 )'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the wp-calypso package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run -s install-if-deps-outdated && node bin/welcome.js && ( check-node-version --package || exit 0 )```

@Viper007Bond
Copy link
Contributor

Interestingly even npm install fails for me:

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: camelcase@4.1.0 (node_modules/jest-runtime/node_modules/camelcase):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EINVAL: invalid argument, lstat '/mnt/c/work/wpdev/wp-calypso/node_modules/.staging/camelcase-9fe49acd'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: supports-color@4.5.0 (node_modules/webpack/node_modules/supports-color):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EINVAL: invalid argument, lstat '/mnt/c/work/wpdev/wp-calypso/node_modules/.staging/supports-color-46f21e5f'
npm ERR! Linux 4.4.0-43-Microsoft
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.11.4
npm ERR! npm  v3.10.10
npm ERR! path /mnt/c/work/wpdev/wp-calypso/node_modules/.staging/source-map-eb6c4a81
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall lstat

npm ERR! EINVAL: invalid argument, lstat '/mnt/c/work/wpdev/wp-calypso/node_modules/.staging/source-map-eb6c4a81'```

@DanReyLop
Copy link
Contributor

@withinboredom I'm waiting for kentcdodds/cross-env#149 to get merged, that will fix the problem.

In the meantime, there's a workaround in #16452 (comment)

DanReyLop pushed a commit that referenced this pull request Oct 27, 2017
…mmands in Windows with undefined env variables

Fixes #16452
Closes #19084

The latest version of `cross-env` (`5.1.1`) includes a fix to #16452.
The fix is: kentcdodds/cross-env#149
Now the behaviour of commands like `cross-env node $UNDEFINED_VAR index.js` is expanding the variable
to the empty string, both in Windows and in UNIX.

To get the new version of `cross-env` working, I had to change all `cross-env` commands to `cross-env-shell`,
as this was a breaking change on `cross-env@5`.

To test: run `npm start` on a Windows `cmd.exe` shell, check that it works.

cc/ @Viper007Bond @withinboredom
DanReyLop pushed a commit that referenced this pull request Nov 2, 2017
…ommands in Windows with undefined env variables

Fixes #16452
Closes #19084

The latest version of `cross-env` (`5.1.1`) includes a fix to #16452.
The fix is: kentcdodds/cross-env#149
Now the behaviour of commands like `cross-env node $UNDEFINED_VAR index.js` is expanding the variable
to the empty string, both in Windows and in UNIX.

To get the new version of `cross-env` working, I had to change all `cross-env` commands to `cross-env-shell`,
as this was a breaking change on `cross-env@5`.

To test: run `npm start` on a Windows `cmd.exe` shell, check that it works.

cc/ @Viper007Bond @withinboredom
DanReyLop pushed a commit that referenced this pull request Nov 16, 2017
…ommands in Windows with undefined env variables

Fixes #16452
Closes #19084

The latest version of `cross-env` (`5.1.1`) includes a fix to #16452.
The fix is: kentcdodds/cross-env#149
Now the behaviour of commands like `cross-env node $UNDEFINED_VAR index.js` is expanding the variable
to the empty string, both in Windows and in UNIX.

To get the new version of `cross-env` working, I had to change all `cross-env` commands to `cross-env-shell`,
as this was a breaking change on `cross-env@5`.

To test: run `npm start` on a Windows `cmd.exe` shell, check that it works.

cc/ @Viper007Bond @withinboredom
DanReyLop pushed a commit that referenced this pull request Nov 17, 2017
…ommands in Windows with undefined env variables

Fixes #16452
Closes #19084

The latest version of `cross-env` (`5.1.1`) includes a fix to #16452.
The fix is: kentcdodds/cross-env#149
Now the behaviour of commands like `cross-env node $UNDEFINED_VAR index.js` is expanding the variable
to the empty string, both in Windows and in UNIX.

To get the new version of `cross-env` working, I had to change all `cross-env` commands to `cross-env-shell`,
as this was a breaking change on `cross-env@5`.

To test: run `npm start` on a Windows `cmd.exe` shell, check that it works.

cc/ @Viper007Bond @withinboredom
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 17, 2017
@lancewillett lancewillett deleted the fix/windows-boot branch February 20, 2018 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants