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

Cannot assign to read only property 'Symbol(Symbol.toStringTag)' of object '#<process>' #3638

Closed
devnet-uk opened this issue Mar 14, 2019 · 7 comments

Comments

@devnet-uk
Copy link

Version

3.5.1

Environment info

  System:
    OS: macOS 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
  Binaries:
    Node: 11.11.0 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.7.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 72.0.3626.121
    Firefox: 64.0
    Safari: 12.0.3
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.2
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.2
    @vue/babel-preset-app:  3.5.1
    @vue/babel-preset-jsx:  1.0.0-beta.2
    @vue/babel-sugar-functional-vue:  1.0.0-beta.2
    @vue/babel-sugar-inject-h:  1.0.0-beta.2
    @vue/babel-sugar-v-model:  1.0.0-beta.2
    @vue/babel-sugar-v-on:  1.0.0-beta.2
    @vue/cli-overlay:  3.5.1
    @vue/cli-plugin-babel: ^3.5.0 => 3.5.1
    @vue/cli-plugin-e2e-nightwatch: ^3.5.0 => 3.5.1
    @vue/cli-plugin-eslint: ^3.5.0 => 3.5.1
    @vue/cli-plugin-unit-jest: ^3.5.0 => 3.5.1
    @vue/cli-service: ^3.5.0 => 3.5.1
    @vue/cli-shared-utils:  3.5.1
    @vue/component-compiler-utils:  2.6.0
    @vue/eslint-config-standard: ^4.0.0 => 4.0.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.2
    jest-serializer-vue:  2.0.2
    vue: ^2.6.6 => 2.6.9
    vue-eslint-parser:  5.0.0
    vue-hot-reload-api:  2.3.3
    vue-jest:  3.0.4
    vue-loader:  15.7.0
    vue-router: ^3.0.1 => 3.0.2
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.5.21 => 2.6.9
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.0.1 => 3.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Create a standard Vue Project with Jest as the unit test framework. The sample test will fail with the following message.

Test suite failed to run

TypeError: Cannot assign to read only property 'Symbol(Symbol.toStringTag)' of object '#<process>'

  at exports.default (node_modules/jest-environment-jsdom/node_modules/jest-util/build/create_process_object.js:15:34)

What is expected?

test to pass

What is actually happening?

Test suite failed to run

TypeError: Cannot assign to read only property 'Symbol(Symbol.toStringTag)' of object '#<process>'

  at exports.default (node_modules/jest-environment-jsdom/node_modules/jest-util/build/create_process_object.js:15:34)

I believe this is related to the newest version of node (11.11.0) and has been addressed by Facebook as part of Jest 24.5.0 release (jestjs/jest@800f2f8)

Also posted in React Git Issue log: facebook/create-react-app#6591

@miking-the-viking
Copy link

+1
I've also just started experiencing this when trying to run jest in both a Vue CLI project and a NestJS Project shortly after upgrading yarn.

@glazey132
Copy link

glazey132 commented Mar 17, 2019

Experiencing the same issue after switching to yarn in my create react app application. Using React instead of Vue

@silentgecko
Copy link

We've exactly the same error, and waiting for an update of the dependencies (node/jest is already updated, which will fix this error)

@YoshiYo
Copy link

YoshiYo commented Mar 18, 2019

According to the Jest's github, it's due to a recent bug with Node v11.11.

for those facing this issue: this happened after Node v11.11. the quickest fix is to downgrade Node to 11.10.1 in your CI lock file until further investigation

jestjs/jest#8069 (comment)

@mwmcode
Copy link

mwmcode commented Mar 18, 2019

had the same issue, solved when updating node to v11.12.0

@Carduelis
Copy link

Has the same issue: it did appear with image: node:latest in gitlab.yml.
Switching to node:10.15.3 has fixed the issue.

@LinusBorg
Copy link
Member

since it works with node 11.12, I'll close it.

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

8 participants