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

error for missing acorn-jsx package #150

Closed
thescientist13 opened this issue Mar 10, 2024 · 0 comments · Fixed by #151
Closed

error for missing acorn-jsx package #150

thescientist13 opened this issue Mar 10, 2024 · 0 comments · Fixed by #151
Assignees
Labels
0.12.1 bug Something isn't working
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Mar 10, 2024

Summary

Getting this after upgrading to the latest version

➜  greenwood-demo-adapter-vercel git:(chore/upgrade-greenwood-0.30.0) ✗ npm run dev

> greenwood-demo-adapter-vercel@1.0.0 dev
> greenwood develop

-------------------------------------------------------
Welcome to Greenwood (v0.30.0-alpha.0) ♻️
-------------------------------------------------------
Initializing project config
Initializing project workspace contexts
Generating graph of workspace files...
building from local sources...

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'acorn-jsx' imported from /Users/owenbuckley/Workspace/project-evergreen/greenwood-demo-adapter-vercel/node_modules/wc-compiler/src/jsx-loader.js
    at new NodeError (node:internal/errors:393:5)
    at packageResolve (node:internal/modules/esm/resolve:860:9)
    at moduleResolve (node:internal/modules/esm/resolve:909:20)
    at defaultResolve (node:internal/modules/esm/resolve:1124:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:841:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Details

Not sure how this made it through the entire lifecycle, but looking at #142 we completely forget to update the import in the code? Looks we are still referecning acorn-jsx 🤦
https://github.com/ProjectEvergreen/wcc/blob/0.12.0/src/jsx-loader.js#L7C1-L7C29

# current
import jsx from 'acorn-jsx';

# should be
import jsx from '@projectevergreen/acorn-jsx-esm';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.12.1 bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

1 participant