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

Windows binary includes devDependencies #2896

Closed
bahmutov opened this issue Dec 4, 2018 · 8 comments · Fixed by #2904
Closed

Windows binary includes devDependencies #2896

bahmutov opened this issue Dec 4, 2018 · 8 comments · Fixed by #2904
Assignees
Labels
OS: windows process: build Related to our internal build process type: bug
Milestone

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Dec 4, 2018

bug

Windows binary seems to include devDependencies, see #2861 (comment)

Unclear why this happens, but it should not happen

@bahmutov bahmutov self-assigned this Dec 4, 2018
@bahmutov bahmutov added OS: windows process: build Related to our internal build process type: bug labels Dec 4, 2018
@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 4, 2018

Hmm, seeing during Windows build the following output which shows that dev dependencies are probably installed

installing C:/projects/cypress/dist/win32/packages/server
npm install --production --quiet
in folder: C:/projects/cypress/dist/win32/packages/server
npm WARN deprecated supertest-as-promised@3.2.0: SuperTest 2.0+ supports promises natively; use that instead!
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated node-uuid@1.4.1: Use uuid module instead
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated postinstall-build@2.1.3: postinstall-build's behavior is now built into npm! You should migrate off of postinstall-build and use the new `prepare` lifecycle script with npm 5.0.0 or greater.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 4, 2018

Hmm, related issue in NPM CLI

So for some reason NPM 5/6 on Windows AppVeyor installs dev dependencies even with npm install --only=production flag

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 4, 2018

Currently catching this error on AppVeyor

screen shot 2018-12-04 at 3 10 46 pm

screen shot 2018-12-04 at 3 10 53 pm

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 4, 2018

trying to debug this using npm_config_loglevel=silly environment variable

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 4, 2018

Hmm, suspicious output in the log during build

[00:15:08] npm info using npm@5.3.0
[00:15:08] npm info using node@v8.2.1

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 4, 2018

Using latest node, and still seeing difference when calling NPM install on Windows vs Mac

windows

[00:13:34] installing C:/projects/cypress/dist/win32/packages/server
[00:13:34] NODE_ENV is undefined
[00:13:34] npm install --only=production --quiet
[00:13:34] in folder: C:/projects/cypress/dist/win32/packages/server
[00:13:34] npm info it worked if it ends with ok
[00:13:34] npm verb cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
[00:13:34] npm verb cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
[00:13:34] npm verb cli   'prefix',
[00:13:34] npm verb cli   '-g' ]
[00:13:34] npm info using npm@6.4.1
[00:13:34] npm info using node@v8.12.0
[00:13:34] npm verb exit [ 0, true ]

mac

$ npm_config_loglevel=silly npm i --only=prod
npm info it worked if it ends with ok
npm verb cli [ '/Users/gleb/.nvm/versions/node/v8.9.4/bin/node',
npm verb cli   '/Users/gleb/.nvm/versions/node/v8.9.4/bin/npm',
npm verb cli   'i',
npm verb cli   '--only=prod' ]
npm info using npm@6.4.1
npm info using node@v8.9.4

hmm, maybe the flags are not passed on Windows?!

@jennifer-shehane jennifer-shehane added the stage: investigating Someone from Cypress is looking into this label Dec 5, 2018
@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 5, 2018

Idea: remove devDependencies field from package.json when building the binary

@brian-mann
Copy link
Member

Released in 3.1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: windows process: build Related to our internal build process type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants