cretueusebiu / laravel-nuxt

A Laravel-Nuxt starter kit.
https://laravel-nuxt.cretueusebiu.com
MIT License
1.15k stars 262 forks source link

Error [ERR_PACKAGE_PATH_NOT_EXPORTED] for @babel\helper-compilation-targets #124

Closed bryandonmarc closed 4 years ago

bryandonmarc commented 4 years ago

Tried following the installation steps, then running npm run dev and this error occurs:

PS C:\Users\PC\Documents\Visual Studio Code\laravel-nuxt\laravel-nuxt> npm run dev

> @ dev C:\Users\PC\Documents\Visual Studio Code\laravel-nuxt\laravel-nuxt
> nuxt -c client/nuxt.config.js

   ╭──────────────────────────────────────────╮
   │                                          │
   │   Nuxt.js v2.11.0                        │
   │   Running in development mode (spa)      │
   │                                          │
   │   Listening on: http://localhost:3000/   │
   │                                          │
   ╰──────────────────────────────────────────╯

i Preparing project for development                                                                                                                                                                                       15:37:34
i Initial build may take a while                                                                                                                                                                                          15:37:34
√ Builder initialized                                                                                                                                                                                                     15:37:34
√ Nuxt files generated                                                                                                                                                                                                    15:37:34

 WARN  Browserslist: caniuse-lite is outdated. Please run the following command: npm update                                                                                                                               15:37:35  

× Client
  Compiled with some errors in 813.67ms

 ERROR  Failed to compile with 1 errors                                                                                                                                                                   friendly-errors 15:37:36  

 ERROR  in ./.nuxt/client.js                                                                                                                                                                              friendly-errors 15:37:36  

Module build failed (from ./node_modules/babel-loader/lib/index.js):                                                                                                                                      friendly-errors 15:37:36  
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in C:\Users\PC\Documents\Visual Studio Code\laravel-nuxt\laravel-nuxt\node_modules\@babel\helper-compilation-targets\package.json
    at applyExports (internal/modules/cjs/loader.js:490:9)
    at resolveExports (internal/modules/cjs/loader.js:506:23)
    at Function.Module._findPath (internal/modules/cjs/loader.js:634:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:27)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\PC\Documents\Visual Studio Code\laravel-nuxt\laravel-nuxt\node_modules\@babel\preset-env\lib\debug.js:8:33)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\PC\Documents\Visual Studio Code\laravel-nuxt\laravel-nuxt\node_modules\@babel\preset-env\lib\index.js:11:14)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
                                                                                                                                                                                                          friendly-errors 15:37:36  
 @ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js

There might be some dependency issues? I also tried using npm ci instead of npm install and the same error occurs. Any ideas?

ridsgn commented 4 years ago

same issue here