<context> Uncaught SyntaxError: The requested module '/node_modules/@marko-tags/context/src/helpers.js' does not provide an export named 'pushProvider'
Nicolab opened this issue · 1 comments
Nicolab commented
@marko-tags/context@v2.2.2
Details
I want to share data across a parent tag and a nested tag but I have this error. Also with the doc example.
Expected Behavior
Share data across nested tag.
Actual Behavior
Uncaught SyntaxError: The requested module '/node_modules/@marko-tags/context/src/helpers.js' does not provide an export named 'pushProvider'
Your Environment
- Brave 1.30.86 Chromium: 94.0.4606.61 (Build officiel) (64 bits)
- Ubuntu 18.04
"dependencies": {
"@marko-tags/context": "^2.2.2",
"@marko-tags/portal": "^1.2.1",
"@marko/express": "^1.0.0",
"@marko/tags-api-preview": "^0.0.14",
"axios": "^0.22.0",
"core-stack": "^0.2.0",
"cors": "^2.8.5",
"debug": "^4.3.2",
"express": "^4.17.1",
"marko": "^5.15.12",
"mongoose": "^6.0.10",
"qfiles": "^1.0.1",
"storux": "^0.11.3",
"validatorjs": "^3.22.1"
},
"devDependencies": {
"@marko/compiler": "^5.15.11",
"@marko/vite": "^2.1.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@tailwindcss/forms": "^0.3.4",
"@tsconfig/node14": "^1.0.1",
"@vitejs/plugin-legacy": "^1.6.1",
"autoprefixer": "^10.3.7",
"cross-env": "^7.0.3",
"cssnano": "^5.0.8",
"marked": "^3.0.7",
"postcss": "^8.3.9",
"postcss-import": "^14.0.2",
"rimraf": "^3.0.2",
"tailwindcss": "^2.2.16",
"vite": "^2.6.5"
},
Steps to Reproduce
https://markojs.com/docs/state/#globalsubtree this example don't work for me.
Stack Trace
No stack trace, only:
Uncaught SyntaxError: The requested module '/node_modules/@marko-tags/context/src/helpers.js' does not provide an export named 'pushProvider'
DylanPiercey commented
@Nicolab thanks for creating the issue. I believe it is related to vite which does not support commonjs modules loaded from .marko
files, which is what is happening here in the @marko-tags/context
package.
We've started updating packages to output .mjs
as well and that needs to be done here also.