Open AlexJWayne opened 2 years ago
Also experiencing this. This makes the project essentially unusable. @ZachJW34 any input?
@AlexJWayne Playing around I managed to get it to work. I ran the migrate command (nx migrate @nx-plus/nuxt
), then the npm install
. After which nx serve my-app
worked. Not sure if simply running npm install
would have worked, or if this is a documentation issue
@AlexJWayne are you still experiencing this issue? I wasn't able to reproduce this and the reproduction you provided gives me a "Page Not Found". Can you post another reproduction?
@mgray88 Vue 2.7 had some webpack changes, so maybe the npm i bumped it and it resolved itself.
Same issue, and the steps above did not work 🤨
@ZachJW34 I apologize that I missed the notifications on this! And I'm sorry the repo was private. I've fixed that now and you should be able to see the repo.
nx migrate @nx-plus/nuxt
does indeed seem to fix things, which seems weird. So thanks for that @mgray88
Still, I would expect the out of the box virgin repo to work.
I may have spoke too soon. I was able to get it working with a fresh install, but in an existing monorepo that nuxt
migration doesn't help.
I think The culprit seems to be webpack v5. Rolling back to webpack v4.43.0 seems to work, but that breaks other projects.
According to https://nx.dev/guides/webpack-5:
Starting in Nx 13, we only support Webpack 5, which is automatically enabled for all workspaces.
Which leads me here: https://github.com/ZachJW34/nx-plus/issues/225 :(
repeated steps from issue message
having same error.
` $ nx run my-app:serve
nx run my-app:serve
INFO Starting development server...
NX Rule can only have one resource source (provided resource and test + include + exclude) in {
"exclude": [
null
],
"use": [
{
"loader": "/home/.../research/nx/frontend/vue-test/node_modules/cache-loader/dist/cjs.js",
"options": {
"cacheDirectory": "/home/.../research/nx/frontend/vue-test/node_modules/.cache/babel-loader",
"cacheIdentifier": "1979b738"
},
"ident": "clonedRuleSet-39.use[0]"
},
{
"loader": "/home/.../research/nx/frontend/vue-test/node_modules/babel-loader/lib/index.js",
"options": {
"configFile": "/home/.../research/nx/frontend/vue-test/apps/my-app/babel.config.js"
},
"ident": "clonedRuleSet-39.use[1]"
}
]
} Pass --verbose to see the stacktrace.
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Running target "my-app:serve" failed
Failed tasks:
my-app:serve
Hint: run the command with --verbose for more details.
$ nx report nx report
NX Report complete - copy this into the issue template
Node : 14.20.0 OS : linux x64 npm : 6.14.17
Community plugins: @nx-plus/vue: 14.1.0
`
Ok i have managed it working.
rm -rf node_modules package-lock.json
npm i -D webpack@4
npm i
this steps required after initial steps for clean setup of vue v2 project. otherwise webpack v5 would be installed by default.
I have the same issue while i'm installing nuxt plugin. New fresh app Node: 16.17.0 Npm: 8.15.0 nx: 14.7.4
I just went through README and experienced: then when i run npm install i get:
Steps to reproduce: I've just run commands from README :D. That's all. Yesterday i've installed new OS so there should not be weird previous hidden configurations.
I also have the same issue. RIght now I can't get anything to work with this plugin. I've followed the instructions in the README by starting a new NX workspace and added vue to it.
I've tried both vue 2 and vue 3 but get errors on both. If I run vue 3 I will get error: NX Cannot read property 'NormalModule' of undefined If I instead try vue 2 it will give the error: Rule can only have on resource source
Both of these errors can be solved by downgrading webpack to version 4 but this will cause other problems probably because NX only seems to support webpack 5 these days. For example my react-native project that I've added in the same workplace will stop working if I downgrade to webpack 4
Any news on this @ZachJW34 ? 🙂
Can the webpack version be upgraded? Seems like the proper solution.
I have recently published @nx-plus/vue@15.0.0-rc.0 which now used vue-cli v5 (webpack 5). I haven't published any docs/migrations yet but if you're curious you can try it out! It requires v15 of Nx.
I'm going to be working over the next week to write some docs and migrations so stay tuned!
This is actually unusable, thought i was doing something wrong, but following README led to this error. Starting to use NX without this package.
Current Behavior
A cryptic error is thrown when trying to serve the app without modification from the generator.
Produces this output:
Expected Behavior
nx serve my-app
should serve the applicationSteps to Reproduce
I ran the followed commands to create a totally blank nx workspace and create a blank vue app.
I put the result of that in this github repo: https://github.com/AlexJWayne/vue-test
I also tried other configurations of the genrator (vue3, not using babel, plain css) but got the same result.
Failure Logs
Full error with verbose logging:
Environment
Plugin name and version: @nx-plus/vue@4.1.0