Skip to content

[ERR_PACKAGE_PATH_NOT_EXPORTED] #6

@Nextdrive-NeilChen

Description

@Nextdrive-NeilChen

I just want to share how I have finally got this project (what a great project!! thanks to NelsonEAX) to run in dev mode in my env (Ubuntu 18.04 with using nvm to install node v12.18.3):

Follow along README.md, when npm run serve I got:

> vue-cli-service serve --https

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                               8:27:35 PM

 error  in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /home/neil/Projects/vue-vuetify-admin/node_modules/@babel/helper-compilation-targets/package.json

Google searches found me: How to fix “Module build failed (from ./node_modules/babel-loader/lib/index.js):”? and Error: Missing class properties transform

so I did:

$ npm install @babel/core @babel/preset-env --save-dev
$ npm install @babel/plugin-proposal-class-properties --save-dev

in the project root I added a .babelrc which is a json:

{
	plugins: ['@babel/plugin-proposal-class-properties']
}

also I touched babel.config.js so it looks like:

module.exports = {
  presets: [
	'@vue/app',
	'@babel/preset-env'
  ],
};

then I did:

$ npm install
$ npm run serve

then I can visit https://localhost:8080

hopefully the above findings can save some of your time if you are having the same trouble as I have had.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions