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

Getting error @shopify/hydrogen doesn't appear to be written in CJS, #388

Closed
nitin-webdesk opened this issue Dec 21, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@nitin-webdesk
Copy link

@shopify/hydrogen doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

Please check it.

Frontend seeing only logo and cart icon

@nitin-webdesk nitin-webdesk added the bug Something isn't working label Dec 21, 2021
@frehner
Copy link
Contributor

frehner commented Dec 21, 2021

I believe this is partially a duplicate of #341, specifically regarding the error you're seeing in the console.

However, it also sounds like you can't get the rest of the app to load. If you would like help diagnosing / fixing that issue, please follow the issue template so that we can get the necessary information to help you out.

Thanks!

@nitin-webdesk
Copy link
Author

I am getting warn as below also and not frontend load.
You have enabled the JIT engine which is currently in preview.

@frehner
Copy link
Contributor

frehner commented Dec 21, 2021

Looks like you've opened a discussion about the JIT engine warning here Shopify/hydrogen#389. 👍

With that, I think we've addressed everything we can here. I'm going to close this issue; if you have additional issues, please feel free to ask here or open a new issue while ensuring you use the issue template. Thanks!

@frehner frehner closed this as completed Dec 21, 2021
@thiscodes4u
Copy link

Hello, I just recently updated the yarn packages for my fresh new Hydrogen app and now getting this very same message after running the yarn dev. The app runs as it should btw 😕 .

@shopify/hydrogen doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
Sourcemap for "/Users/me/CODE/projectName/myMachine/node_modules/kolorist/dist/module/index.js" points to missing source files
Sourcemap for "/Users/me/CODE/projectName/myMachine/hydrogen-entry-client.jsx" points to missing source files

package.json

"devDependencies": {
    "@shopify/prettier-config": "^1.1.2",
    "@shopify/stylelint-plugin": "^11.0.1",
    "@tailwindcss/typography": "^0.5.2",
    "autoprefixer": "^10.4.2",
    "cross-env": "^7.0.3",
    "eslint": "^7.31.0",
    "eslint-plugin-hydrogen": "^0.12.1",
    "npm-run-all": "^4.1.5",
    "playwright": "^1.19.2",
    "postcss": "^8.4.5",
    "prettier": "^2.3.2",
    "stylelint": "^14.7.1",
    "tailwindcss": "^3.0.0",
    "vite": "^2.9.0",
    "vitest": "^0.9.3"
  },
  "dependencies": {
    "@headlessui/react": "^1.5.0",
    "@shopify/hydrogen": "^0.16.1",
    "body-parser": "^1.19.1",
    "compression": "^1.7.4",
    "graphql-tag": "^2.12.4",
    "react": "0.0.0-experimental-2bf7c02f0-20220314",
    "react-dom": "0.0.0-experimental-2bf7c02f0-20220314",
    "serve-static": "^1.14.1"
  }

I guess I can roll back for now. Curious if there is something that I did or need to manually fix?

@frehner
Copy link
Contributor

frehner commented Apr 20, 2022

#341 is the issue to track for that error. 👍

rafaelstz pushed a commit to rafaelstz/hydrogen that referenced this issue Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants