Skip to content
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

Can't run builds or tests #3

Closed
Knogobert opened this issue May 8, 2020 · 5 comments
Closed

Can't run builds or tests #3

Knogobert opened this issue May 8, 2020 · 5 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@Knogobert
Copy link

Nice playground! Definitely good inspiration on how to write tests.

But unfortunately I think you're missing a package or something, because when I run cd done && yarn && yarn serve.

I get this:

ERROR  Failed to compile with 1 errors                                                                                                                                 2:17:46 PM

 error  in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/src/main.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Require stack:
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/preset-env/lib/index.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@vue/babel-preset-app/index.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@vue/cli-plugin-babel/preset.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/core/lib/config/files/plugins.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/core/lib/config/files/index.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/core/lib/index.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@vue/cli-plugin-babel/index.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@vue/cli-service/lib/Service.js
- /Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@vue/cli-service/bin/vue-cli-service.js (While processing: "/Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@vue/cli-plugin-babel/preset.js")
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
    at Function.Module._load (internal/modules/cjs/loader.js:890:27)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/USERNAME/Documents/www/meeting-app-unit-tests-playground/done/node_modules/@babel/preset-env/lib/index.js:29:44)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)

 @ multi (webpack)-dev-server/client?http://192.168.1.84:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

I tried installing @babel/compat-data to no avail.

Happy hunting!

@kjugi
Copy link
Owner

kjugi commented May 8, 2020

Hello, let me know which version of vue-cli and node do you have locally by running the following command:

vue -V && node -v

Please make sure if you have at least 4.X vue-cli version. Maybe I will need to update requirements in README. If you have older vue-cli od don't have it, please install or update it by following this instruction

After checking version can you tell me that you are able to create base new project by vue-cli with this command:

vue create yourTempProjectName

Let me know if it's created successfully or not. Thanks for checking my repo!

@kjugi kjugi self-assigned this May 8, 2020
@kjugi kjugi added the invalid This doesn't seem right label May 8, 2020
@Knogobert
Copy link
Author

I didn't have @vue/cli installed globally on this computer before. Now though, after installing it, I have:

vue/cli: 4.3.1
node: v14.2.0

And unfortunately I could successfully create and serve a basic app through vue-cli.

@kjugi
Copy link
Owner

kjugi commented May 22, 2020

Sorry for a late response but didn't spot notify about the message. I've dug a bit through your error and found out some hints.

This issue babel/babel#11439 which recommends updating babel packages but I will just update @vue/cli in the repo to the latest version and release. They updated babel there and it should be fine there.

Also, using node v13 and v14 - which was your case - can cause problems during using older vue/cli like babel/babel#11491 here but we will see after my merge with an update.

But wasn't sure why I can't reproduce this problem on my local when having the same setup. Maybe I have some globally installed dependencies and works well.

Anyway to summarize, after release tries these steps:

  1. fetch new changes
  2. delete node_module from a done directory and install dependencies again

And finally, try to run an app again. Hope it will lead us somewhere.

@kjugi
Copy link
Owner

kjugi commented May 22, 2020

Ok, release is out.

@Knogobert when you will have some time can you give feedback about your issue? I will be thankful

@Knogobert
Copy link
Author

I got it running on my other computer with

@vue/cli 4.0.5
node: v13.7.0

it also kept working when upgrading step by step to

@vue/cli 4.4.6

and then also kept working with

node: v14.6.0

So I'm closing the issue then, thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants