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

Localstorage issue #87

Closed
alexpricedev opened this issue May 1, 2019 · 2 comments
Closed

Localstorage issue #87

alexpricedev opened this issue May 1, 2019 · 2 comments

Comments

@alexpricedev
Copy link

alexpricedev commented May 1, 2019

I was looking back into #83 and I'm not sure if this is a new issue, or if it's simply logging out more information and this in fact is what was causing those issues. Either way, I'm getting:

Error: Uncaught [SecurityError: localStorage is not available for opaque origins]

From reading various docs/tickets it seems that JSDom wants a url in the config.

I tried setting a url in the createScriptRunning.js file but that resulted in failure to find the script urls.

I'm hoping you can get a bit further with this than me! Cheers

Edit: Heres the jsdom ticket: jsdom/jsdom#2304

@alexpricedev
Copy link
Author

I've gone a different route with SSR now so wont need to fix my issues with navi-scripts. Cheers

@AlysCole
Copy link

Getting this issue on my create-react-blog setup. I moved my create-react-blog project into an existing React app and, currently, my package.json looks like this:

{
  "name": "app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.0-14",
    "@fortawesome/free-brands-svg-icons": "^5.7.2",
    "@fortawesome/free-solid-svg-icons": "^5.7.2",
    "@fortawesome/react-fontawesome": "^0.1.4",
    "apollo-boost": "^0.4.1",
    "apollo-link-ws": "^1.0.18",
    "auth0-js": "^9.10.0",
    "blueimp-md5": "^2.3.0",
    "brace": "^0.11.1",
    "feed": "^2.0.2",
    "graphql": "^14.1.1",
    "import-all.macro": "^2.0.3",
    "jwt-decode": "^2.2.0",
    "loadable-components": "^2.2.2",
    "lodash": "^4.17.11",
    "navi": "^0.13.3",
    "navi-scripts": "^0.13.3",
    "netlify-cli": "^2.6.0",
    "prismjs": "^1.15.0",
    "prop-types": "^15.7.2",
    "react": "^16.8.6",
    "react-ace": "^6.4.0",
    "react-adopt": "^0.6.0",
    "react-apollo": "^2.5.2",
    "react-click-outside": "^3.0.1",
    "react-content-loader": "^4.2.1",
    "react-dom": "^16.8.6",
    "react-dropzone": "^10.0.1",
    "react-ga": "^2.5.3",
    "react-grid-system": "^4.4.3",
    "react-gtm-module": "^2.0.8",
    "react-helmet": "^5.2.0",
    "react-motion-drawer": "^3.1.0",
    "react-navi": "^0.13.3",
    "react-navi-helmet-async": "^0.13.3",
    "react-notify-toast": "^0.5.0",
    "react-popover": "^0.5.7",
    "react-quill": "^1.3.1",
    "react-redux": "^6.0.1",
    "react-responsive-modal": "^3.6.0",
    "react-reveal": "^1.2.2",
    "react-router-dom": "^4.3.1",
    "react-router-hash-link": "^1.2.1",
    "react-scripts-mdx": "^3.0.3",
    "react-select": "^2.4.2",
    "react-smooshpack": "^0.0.56",
    "react-sortable-tree": "2.2.0",
    "react-sortable-tree-theme-full-node-drag": "^1.1.0",
    "react-splitter-layout": "^4.0.0",
    "react-tabs": "^3.0.0",
    "react-textarea-autosize": "^7.1.0",
    "react-window-size": "^1.2.0",
    "redux": "^4.0.0",
    "redux-form": "^8.1.0",
    "rimraf": "^2.6.2",
    "runkit-embed-react": "^1.0.0",
    "simple-react-validator": "^1.0.7",
    "slugify": "^1.3.2",
    "styled-components": "^4.1.3",
    "subscriptions-transport-ws": "^0.9.16"
  },
  "scripts": {
    "predeploy": "npm run build",
    "start": "react-scripts start",
    "build": "react-scripts build && navi-scripts build",
    "analyze": "rm -rf bundle && source-map-explorer 'build/static/js/*.js' --html bundle/analyze.html",
    "test": "react-scripts test --transformIgnorePatterns \"node_modules/(?!(react-smooshpack|react-sortable-tree|react-splitter-layout|react-quill|react-day-picker|simple-line-icons|react|react-apollo)/)\"",
    "eject": "react-scripts eject",
    "serve": "navi-scripts serve",
    "deploy": "netlify deploy --dir=build",
    "deploy:prod": "netlify deploy --dir=build --prod"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "devDependencies": {
    "enzyme": "^3.9.0",
    "enzyme-adapter-react-16": "^1.13.2",
    "enzyme-to-json": "^3.3.5",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-config-prettier": "^4.1.0",
    "eslint-plugin-import": "^2.16.0",
    "eslint-plugin-jest": "^22.3.2",
    "eslint-plugin-jsx-a11y": "^6.2.1",
    "eslint-plugin-prettier": "^3.0.1",
    "eslint-plugin-react": "^7.12.4",
    "gh-pages": "^2.0.1",
    "prettier": "^1.16.4",
    "react-test-renderer": "^16.8.6",
    "redux-mock-store": "^1.5.3",
    "source-map-explorer": "^2.0.0"
  },
  "resolutions": {
    "jsdom": "13.2.0"
  }
}

I'm using yarn's resolutions config to try and use a later version of jsdom, but no dice. Any idea what could be causing this issue?

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

2 participants