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

run meteor-client:bundle results in semver directory not found error #175

Open
ntombi opened this issue Dec 14, 2017 · 5 comments
Open

run meteor-client:bundle results in semver directory not found error #175

ntombi opened this issue Dec 14, 2017 · 5 comments

Comments

@ntombi
Copy link

ntombi commented Dec 14, 2017

Hi,

I've been stuck on step 4 of the "WhatsApp Clone with Meteor and Ionic 2 CLI" tutorial for several days now. When I run the "npm run meteor-client:bundle" command, meteor seems to create an app in a Temp folder (Windows 10 OS) and then complains about semver directory not being there. I tried copying the semver folder that was in my whatsapp/node_modules folder, but it then complains that 'C:\Users\Ntombi\AppData\Local\Temp\semver\bin\semver' is not a directory. Please help me get over this hurdle.

Here are my system details:
OS: Windows 10
npm: 5.5.1
meteor: 1.6.0.1

Dependencies:
@angular/... : 5.0.3
@ionic-native/... : 4.4.0
babel-runtime: 6.26.0
ionic-angular: 3.9.2
meteor-rxjs: 0.4.8
semver: 5.4.1

Error Details:
`PS C:\Code\Tutorials\WhatsAppClone\whatsapp> npm run meteor-client:bundle

[email protected] meteor-client:bundle C:\Code\Tutorials\WhatsAppClone\whatsapp
meteor-client bundle -s api

Created a new Meteor app in
'C:\Users\Ntombi\AppData\Local\Temp\tmp-13204ubo4fNnA20Pw'.

To run your new app:
cd C:\Users\Ntombi\AppData\Local\Temp\tmp-13204ubo4fNnA20Pw
meteor

If you are new to Meteor, try some of the learning resources here:
https://www.meteor.com/tutorials

meteor create --bare to create an empty app.
meteor create --full to create a scaffolded app.

up to date in 2.498s

Changes to your project's package version selections:

barbatus:typescript added, version 0.6.12
barbatus:typescript-compiler added, version 0.9.12
barbatus:typescript-runtime added, version 1.0.2

WARNING: The output directory is under your source tree.
Your generated files may get interpreted as source code!
Consider building into a different directory instead
meteor build ../output

C:\Users\Ntombi\AppData\Local.meteor\packages\meteor-tool\1.6.0-rc.7\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
throw error;
^

Error: ENOENT: no such file or directory, stat 'C:\Users\Ntombi\AppData\Local\Temp\semver\bin\semver'
at Object.fs.statSync (fs.js:955:11)
at Object.wrapper (C:\tools\fs\files.js:1594:35)
at Object.files.(anonymous function) [as stat] (C:\tools\fs\files.js:1729:27)
at symlinkWithOverwrite (C:\tools\isobuild\builder.js:727:17)
at optimisticReaddir.forEach.item (C:\tools\isobuild\builder.js:554:11)
at Array.forEach ()
at walk (C:\tools\isobuild\builder.js:462:34)
at optimisticReaddir.forEach.item (C:\tools\isobuild\builder.js:551:11)
at Array.forEach ()
at walk (C:\tools\isobuild\builder.js:462:34)
at Builder.copyDirectory (C:\tools\isobuild\builder.js:589:5)
at C:\tools\isobuild\bundler.js:2248:17
at Function..each..forEach (C:\Users\Ntombi\AppData\Local.meteor\packages\meteor-tool\1.6.0-rc.7\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at JsImage.write (C:\tools\isobuild\bundler.js:2207:7)
at ServerTarget.write (C:\tools\isobuild\bundler.js:2479:13)
at C:\tools\isobuild\bundler.js:2599:30
at Object.keys.forEach.name (C:\tools\isobuild\bundler.js:2734:9)
at Array.forEach ()
at C:\tools\isobuild\bundler.js:2724:26
at C:\tools\isobuild\bundler.js:3065:22
at C:\tools\utils\buildmessage.js:271:13
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:264:29
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:262:18
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:253:23
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.capture (C:\tools\utils\buildmessage.js:252:19)
at bundle (C:\tools\isobuild\bundler.js:2898:31)
at files.withCache (C:\tools\isobuild\bundler.js:2845:32)
at Object.withCache (C:\tools\fs\files.js:1694:12)
at Object.exports.bundle (C:\tools\isobuild\bundler.js:2845:16)
at buildCommand (C:\tools\cli\commands.js:1010:30)
at Command.func (C:\tools\cli\commands.js:885:12)
at C:\tools\cli\main.js:1491:23
C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\node_modules\execa\index.js:277
throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr));
^

Error: null
at Function.module.exports.sync (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\node_modules\execa\index.js:277:26)
at Object.bundle (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\lib\bundler.js:97:9)
at Command. (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\cli:47:13)
at Command.listener (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\node_modules\commander\index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\node_modules\commander\index.js:653:12)
at Command.parse (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\node_modules\commander\index.js:475:21)
at Object. (C:\Users\Ntombi\AppData\Roaming\npm\node_modules\meteor-client-bundler\cli:55:9)
at Module._compile (module.js:635:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] meteor-client:bundle: meteor-client bundle -s api
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] meteor-client:bundle 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! C:\Users\Ntombi\AppData\Roaming\npm-cache_logs\2017-12-13T18_07_14_377Z-debug.log
`
Many thanks,
Ntombi

@IlicPavle
Copy link

Try updating your meteor version or if that doesn't work specify meteor version in a config file that you will add to the bundle script. I had the same issue and this worked for me.

@ntombi
Copy link
Author

ntombi commented Dec 18, 2017

Thank you very much @IlicPavle! I tried modifying a bunch of files (package.json, package-lock.json) to add the meteor version. Either modifying package-lock.json or appending --packs-dir ./packages to the run meteor-client bundle command did the trick. I'm glad I can finally move on. Thanks again!

@paskuale22
Copy link

what did you do exactly?
thnx

@adelriosantiago
Copy link

adelriosantiago commented Mar 1, 2018

Doing npm run meteor-client:bundle --packs-dir ./packages will work. I think it is because the default value is METEOR_PACKAGE_DIRS="/usr/local/my_packages/" (see https://docs.meteor.com/environment-variables.html#METEOR-PACKAGE-DIRS) which will not exist in Windows 10. So a temporal path must be used.

@matheusBrant
Copy link

@ntombi @adelriosantiago it works! Thanksss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants