6

I've got an issue when try running server for vue project

this is the issue

ERROR Error: No valid exports main found for ' PROJECT PATH\node_modules\colorette' Error: No valid exports main found for 'PROJECT PATH\node_modules\colorette' at resolveExportsTarget (internal/modules/cjs/loader.js:622:9) at applyExports (internal/modules/cjs/loader.js:499:14) at resolveExports (internal/modules/cjs/loader.js:548:12) at Function.Module._findPath (internal/modules/cjs/loader.js:654:22) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27) at Function.Module._load (internal/modules/cjs/loader.js:859:27) at Module.require (internal/modules/cjs/loader.js:1028:19) at require (internal/modules/cjs/helpers.js:72:18) at Object. (C:\Users\AlaaMohammed\PhpstormProjects\vue-2\node_modules\autoprefixer\lib\autoprefixer.js:5:17) at Module._compile (internal/modules/cjs/loader.js:1139:30) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] serve: vue-cli-service serve npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] serve script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I want some to response to my problem

1
  • Did it ever work in the past? Can you edit the question to include your package.json file to rule out package conflicts? What versions of node, npm, and vue-cli are you using? Commented Jul 7, 2020 at 4:02

5 Answers 5

11

try to reinstall the colerette plugin version 1.2.0 manually

npm i [email protected]
Sign up to request clarification or add additional context in comments.

2 Comments

Didn't work for me but upgrading from node v13 to node v14.5 worked.
If you don't want to upgrade Node, you may need to also pin autoprefixer at a lower version: npm install [email protected] coupled with [email protected] fixed it for me on Node v13.
9

Upgrade node to version 14.5 will resolve this issue.

Comments

1

I did the following and it worked:
1)_ First i checked the versions

  • npm outdated
  • npm update
  • npm install
  • npx npm-check-updates - u

2)_ Once i was 100% sure the problems didn't come from that source, i typed the following:

npm install [email protected]

and it solved the problem.

Note: try to "npm start" before you connect the scss to the App, just to see if you can visualize something (like: hello world) in the browser, if everything is fine, create the folder scss with the main.scss inside of it, import it and then try the steps.

Comments

0

My node -v: v16.1.0 What worked for me npm ci

Comments

-1

Updating the node version can solve your problem.

1 Comment

this was suggested in an earlier answer with more detail (specific node version), why post this?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.