Nikita Kalitin
Nikita Kalitin

Reputation: 183

Vue.js(CLI): Entry module not found: Error: Can't resolve '***'

I run vue-cli-service build and everything is fine.

But if I run vue-cli-service build --mode development - I get the error message:

Error: Can't resolve '/home/nik/DEV/my/blackchaose.vuejs_tpl/development' in '/home/nik/DEV/my/blackchaose.vuejs_tpl'

Do you know what I am doing wrong?

And how else can I run the assembly in Development mode?

p.s. I already have a .env.local file in the root directory with the following contents: NODE_ENV = development

Upvotes: 2

Views: 2276

Answers (2)

Zout
Zout

Reputation: 924

This is a slightly different issue, but I was running into this problem when deploying the site via a Github workflow. The problem was that we had - run: npm run build --mode development which caused the error about being unable to resolve the entry module.

The fix was to add a new build script into package.json under scripts like this: "build-dev": "vue-cli-service build --mode development" and then to reference that new build script from the workflows .yml file like so: - run: npm run build-dev

Upvotes: 4

MJ_Wales
MJ_Wales

Reputation: 893

With NODE_ENV set to develpment, you can assemble and run your project with vue-cli-service serve

See the vue-cli docs for more information on different modes: https://cli.vuejs.org/guide/mode-and-env.html

Upvotes: 0

Related Questions