2
votes

I create a project using:

vue create test

Then going to my repo:

cd test

but when im trying to lunch by using the command:

npm run serve

i got an issue :

INFO Starting development server... ERROR Error: No valid exports
main found for '/home/paul/PPers/test/node_modules/colorette' Error:
No valid exports main found for
'/home/paul/PPers/test/node_modules/colorette'
at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
at applyExports (internal/modules/cjs/loader.js:502:14)
at resolveExports (internal/modules/cjs/loader.js:551:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
at Function.Module._load (internal/modules/cjs/loader.js:855:27)
at Module.require (internal/modules/cjs/loader.js:1033:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/home/paul/PPers/test/node_modules/autoprefixer /lib/autoprefixer.js:5:17)
at Module._compile (internal/modules/cjs/loader.js:1144: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.
npm ERR! A complete log of this run can be found in: npm ERR!
/home/paul/.npm/_logs/2020-07-07T14_02_14_349Z-debug.log

Here is the log :

0 info it worked if it ends with ok  
1 verbose cli [  
1 verbose cli   '/home/paul/.nvm/versions/node/v13.6.0/bin/node',  
1 verbose cli   '/home/paul/.nvm/versions/node/v13.6.0/bin/npm',  
1 verbose cli   'run',  
1 verbose cli   'serve'  
1 verbose cli ]  
2 info using [email protected]  
3 info using [email protected]  
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]  
5 info lifecycle [email protected]~preserve: [email protected]  
6 info lifecycle [email protected]~serve: [email protected]  
7 verbose lifecycle [email protected]~serve: unsafe-perm in lifecycle true  
8 verbose lifecycle [email protected]~serve: PATH: /home/paul/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/paul/PPers/test/node_modules/.bin:/home/paul/node_modules/.bin:/home/paul/.nvm/versions/node/v13.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/paul/ampl-2019/ampl  
9 verbose lifecycle [email protected]~serve: CWD: /home/paul/PPers/test  
10 silly lifecycle [email protected]~serve: Args: [ '-c', 'vue-cli-service serve' ]  
11 silly lifecycle [email protected]~serve: Returned: code: 1  signal: null  
12 info lifecycle [email protected]~serve: Failed to exec serve script  
13 verbose stack Error: [email protected] serve: `vue-cli-service serve`  
13 verbose stack Exit status 1  
13 verbose stack     at EventEmitter.<anonymous> (/home/paul/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)  
13 verbose stack     at EventEmitter.emit (events.js:321:20)  
13 verbose stack     at ChildProcess.<anonymous> (/home/paul/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)  
13 verbose stack     at ChildProcess.emit (events.js:321:20)  
13 verbose stack     at maybeClose (internal/child_process.js:1028:16)  
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)  
14 verbose pkgid [email protected]  
15 verbose cwd /home/paul/PPers/test  
16 verbose Linux 5.3.0-62-generic  
17 verbose argv "/home/paul/.nvm/versions/node/v13.6.0/bin/node" "/home/paul/.nvm/versions/node/v13.6.0/bin/npm" "run" "serve"  
18 verbose node v13.6.0  
19 verbose npm  v6.14.5  
20 error code ELIFECYCLE  
21 error errno 1  
22 error [email protected] serve: `vue-cli-service serve`  
22 error Exit status 1  
23 error Failed at the [email protected] serve script.  
23 error This is probably not a problem with npm. There is likely additional logging output above.  
24 verbose exit [ 1, true ]  

Does anyone have an idea to solve this problem?

1
firstly try npm install after cd testtuhin47
Same problem, even after launching npm install ...LeraLam
It looks like your error is coming from the collorete npm module `No valid exports main found for '/home/paul/PPers/test/node_modules/colorette' I looked on npm and that looks like its not even a package. I would go to your node_modules folder and delete thatAaron Angle
Having save issue on reactjs, you get a solution?Newton José
Update your node version. See this and this. @NewtonJoséSteven B.

1 Answers

0
votes

I was able to fix the issue by upgrading node to v14.5.0 based on the comment by @StevenB