Unexpected token export when running nx serve <app> (next)
#8635
benwainwright
started this conversation in
General
Replies: 2 comments
-
|
Could this be the same I had? Solved it by adding See |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
just restart nx deamon |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I have a nextJS monorepo with a web-app and a couple of dependency libraries. Building the application works fine and I've been able to successfully deploy the built code.
Unfortately, the
yarn nx servetarget gives me an error when trying to compile imported librariesunexpected token export{ "root": "apps/web-app", "sourceRoot": "apps/web-app", "projectType": "application", "targets": { "build": { "executor": "@nrwl/next:build", "outputs": [ "{options.outputPath}", "apps/web-app/out_lambda" ], "defaultConfiguration": "production", "options": { "root": "apps/web-app", "outputPath": "dist/apps/web-app" }, "configurations": { "production": {} } }, "serve": { "executor": "@nrwl/next:server", "options": { "buildTarget": "web-app:build", "buildLibsFromSource": false, // I've tried this both true and false "dev": true }, "configurations": { "production": { "buildTarget": "web-app:build:production", "dev": false } } }, }, "tags": [] }When I load the offending route I get this in the server console:
And this in the browser console
Any help would be much appreciated...
Beta Was this translation helpful? Give feedback.
All reactions