Closed tomoat closed 2 years ago
Hi @tomoat. Thanks for taking the time to submit this issue. Can you provide steps to reproduce this, please?
Hi @filipsobol. I'm getting this error too. Work with https://github.com/vuestorefront/magento2 And when i use a yarn dev, i get this error.
workaround: downgrade from Node v16 to Node v12.
Hi @filipsobol! Also facing this issue.
It seems the issue is caused on Node v16 by DEP0128, due to the invalid main
inside package.json
of @vue-storefront/nuxt-theme
.
The warning was introduced in V12, but only became runtime deprecated in V16. Running with a lower Node version should mitigate the issue until the upstream dep (@vue-storefront/nuxt-theme
) releases a fix. 👍
The steps are pretty standard (using Node V16):
1. Initialize a new project using CLI (choosing Vendure as backend)
➜ npx @vue-storefront/cli init
? What's your project name? steps
? Choose integration Vendure
✔ VSF Project template initialized successfully.
ℹ VSF Check out https://docs.vuestorefront.io/v2
The project is initialized successfully.
2. Install dependencies (using Yarn)
➜ cd steps
➜ yarn install
yarn install v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
warning Pattern ["@nuxt/typescript-build@latest"] is trying to unpack in the same destination "/home/user/.cache/yarn/v6/npm-@nuxt-typescript-build-2.1.0-191fe60e942ce84a01468ba6e255744e01c7c538-integrity/node_modules/@nuxt/typescript-build" as pattern ["@nuxt/typescript-build@^2.0.0"]. This could result in non-deterministic behavior, skipping.
[4/5] Linking dependencies...
warning "@storefront-ui/vue > vue2-leaflet@2.7.1" has unmet peer dependency "@types/leaflet@^1.5.7".
warning "@vue-storefront/nuxt > @nuxtjs/composition-api@0.17.0" has unmet peer dependency "@nuxt/vue-app@^2.14.11".
warning "@vue-storefront/nuxt > @nuxtjs/composition-api@0.17.0" has unmet peer dependency "fs-extra@^8.1.0".
warning " > @vue-storefront/vendure@1.0.0" has unmet peer dependency "@vue/composition-api@1.0.0-beta.21".
warning "nuxt > @nuxt/components@2.2.1" has unmet peer dependency "consola@*".
warning "vue-jest > @babel/plugin-transform-modules-commonjs@7.16.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @vue/test-utils@1.2.2" has unmet peer dependency "vue-template-compiler@^2.x".
warning " > babel-core@7.0.0-bridge.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > babel-jest@27.3.1" has unmet peer dependency "@babel/core@^7.8.0".
warning "babel-jest > babel-preset-jest@27.2.0" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax@1.0.1" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/plugin-syntax-bigint@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/plugin-syntax-import-meta@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > jest-watch-toggle-config@2.0.1" has unmet peer dependency "jest-validate@>= 23.4.0".
warning " > mochawesome@6.3.1" has unmet peer dependency "mocha@>=7".
warning " > rollup-plugin-terser@7.0.2" has unmet peer dependency "rollup@^2.0.0".
warning " > vue-jest@4.0.1" has unmet peer dependency "@babel/core@7.x".
warning " > vue-jest@4.0.1" has incorrect peer dependency "babel-jest@>= 24 < 27".
warning " > vue-jest@4.0.1" has incorrect peer dependency "jest@26.x".
warning " > vue-jest@4.0.1" has unmet peer dependency "vue-template-compiler@^2.x".
[5/5] Building fresh packages...
Done in 100.98s.
The depencies are installed sucessfuly, thought many of them have unmet peer dependencies, including some of @vue-storefront/*
.
3. Attempt to start application in development mode
➜ yarn dev
yarn run v1.22.17
$ nuxt
ℹ VSF Starting Vue Storefront Nuxt Module
✔ VSF Installed Vue Storefront Context plugin
✔ VSF Installed Vue Storefront SSR plugin
✔ VSF Installed VSF Logger plugin
✔ VSF Installed Vue Storefront E2E testing plugin
✔ VSF Installed Internationalization Cookies plugin
WARN useMeta is not supported in onGlobalSetup as @nuxtjs/pwa detected.
See https://github.com/nuxt-community/composition-api/issues/307
✔ VSF Installed nuxt Composition API Module
✔ VSF Installed StorefrontUI Module
✔ VSF Installed Performance Module
ℹ VSF Using raw source/ESM for @vue-storefront/vendure
ℹ VSF Using raw source/ESM for @vue-storefront/core
ℹ VSF Using raw source/ESM for @storefront-ui/vue
ℹ VSF Using raw source/ESM for @storefront-ui/shared
ℹ VSF Starting Theme Module
ℹ Middleware starting....
ℹ Loading integrations...
ℹ - Loading: vendure @vue-storefront/vendure-api/server
ℹ - Loading: vendure extension: tokenExtension
✔ - Integration: vendure loaded!
✔ Integrations loaded!
✔ Middleware created!
ℹ NuxtJS collects completely anonymous data about usage
This will help us improve Nuxt developer experience over time.
Read more on https://git.io/nuxt-telemetry
? Are you interested in participating? (Y/n)
ERROR (node:2712) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/user/workspaces/steps/node_modules/@vue-storefront/nuxt-theme/package.json' of 'lib/module.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
Done in 25.88s.
I'm getting this exact same issue, both on Ubuntu 20.04.3 LTS and Mac OS X Catalina (10.15.7)...
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/home/andre-dev'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Hi, I'm experiencing the same issue as well. Do you probably already have some fix or a workaround? Thanks.
@VaranCollins try using Node 12. Node 14 should also work, but at this moment we internally use Node 12 for the development and testing.
What is your question / Please describe your issue
@vue-storefront/nuxt-theme , It runs with this warning
ERROR (node:88484) [DEP0128] DeprecationWarning: Invalid 'main' field in 'node_modules/@vue-storefront/nuxt-theme/package.json' of 'lib/module.js'. Please either fix that or report it to the module author
What version of Vue Storefront are you using?
@vue-storefront/nuxt-theme: 2.5.2
Code of Conduct