-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Could not load node_modules/tslib/tslib.es6.js/tslib.es6.js when using @nuxt/apollo & @vueuse/motion/nuxt together #102
Comments
I'm encountering the same problem at the moment! |
Ran into the same issue, the alias workaround fixed the issue for me. Not an idea solution ofc but it works |
Same on my end, but I had to alias |
I'm unable to reproduce this issue by following your reproduction steps using the latest release so I think this issue has been resolved and can be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Darwin
v16.17.1
3.2.2
2.2.3
yarn@1.22.19
vite
runtimeConfig
,modules
,apollo
@nuxtjs/apollo@5.0.0-alpha.5
,@vueuse/motion/nuxt@2.0.0-beta.27
-
Reproduction
Init project
npx nuxi init <project-name> && cd <project-name>
Install Nuxt Apollo & Vueuse Motion
yarn add -D @nuxtjs/apollo@next
yarn add @vueuse/motion@2.0.0-beta.27
Setup minimal configuration in nuxt.config.ts:
Build
yarn build
Describe the bug
The following log is the result of running
yarn build
with the aforementioned setup. It seems like its trying to look for the 'tslib.es6.js' file in the '/tslib.es6.js/' folder. This file and folder do not exist, however the 'tslib.es6.js' file does exist in the root of the tslib package. This error only appears when both the Motion and Apollo modules are defined in the nuxt.config.ts, when just either one is defined there's is no issue and it builds as expected.Additional context
I found a workaround for now, when I comment out the line
nuxt.options.alias.tslib = "tslib/tslib.es6.js";
in node_modules/@vueuse/motion/dist/nuxt.cjs & node_modules/@vueuse/motion/dist/nuxt.mjs it will built correctly. However this not a particularly durable solution, so looking a little further I figured out that adding the following to the nuxt.config.ts does the trick as well.It seems like '@vueuse/motion' is creating an alias and '@nuxtjs/apollo' is trying to add the file name again after that. This results in the file not being found due to the incorrect location: 'node_modules/tslib/tslib.es6.js/tslib.es6.js'.
The text was updated successfully, but these errors were encountered: