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

New repository structure results in: cannot find module 'parse-server' #336

Closed
omairvaiyani opened this issue Feb 10, 2016 · 14 comments
Closed
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@omairvaiyani
Copy link
Contributor

Happened once I updated to the latest build:

Error: Cannot find module 'parse-server'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
var ParseServer = require('parse-server').ParseServer; // not changed this line
@gfosco
Copy link
Contributor

gfosco commented Feb 10, 2016

can you re-run npm install and make sure that's not it?

@omairvaiyani
Copy link
Contributor Author

I did - I think it might be a mistake on my end regarding how I installed the repo. I forked it, and ran npm install omairvaiyani/parse-server which cloned this repo's master branch. I see that the master branch is different from the latest tag 2.0.7, the latter of which works fine.

@drew-gross
Copy link
Contributor

Looks like the problem has been found.

@omairvaiyani
Copy link
Contributor Author

Could this be re-opened. I need clarification as I'm new to babel - are we supposed to build the repositories using npm build? Because even on 2.0.8, I can't simple use require('parse-server') without trigger the cannot find module error.

@drew-gross
Copy link
Contributor

Yes you should only need to do npm install. If that doesn't work, that is a bug.

@drew-gross drew-gross reopened this Feb 16, 2016
@drew-gross drew-gross added type:bug Impaired feature or lacking behavior that is likely assumed and removed troubleshooting labels Feb 16, 2016
@flovilmart
Copy link
Contributor

@omairvaiyani npm build won't do anything, to trigger a build you have to run npm run build 

@gfosco
Copy link
Contributor

gfosco commented Mar 2, 2016

Not clear if there's an issue here and it's getting stale. If there is a problem with the latest version, please open a new issue. Thanks.

@gfosco gfosco closed this as completed Mar 2, 2016
@TravisHeaver
Copy link

I am having this issue now as well. If I run:
npm install parseplatform/parse-server.git#latest --save
everything works fine. If I run:
npm install parseplatform/parse-server.git#2.6.5 --save
I get the same error: Cannot find module 'parse-server'. Changing nothing else about the project
npm install parseplatform/parse-server.git#master --save gives the same error

@flovilmart
Copy link
Contributor

The tagged commits are not built in the repo, for using a particular version, just use the npm package

@TravisHeaver
Copy link

oh, my end goal is to actually build from my own fork... So in that case my best option is to... include all the build files in my fork commit?

@flovilmart
Copy link
Contributor

it's up to you, but you should have a look at how we release the latest branch, (in resources/npm-git.sh) if you need something similar.

@montymxb
Copy link
Contributor

@TravisHeaver like flovilmart mentioned only what's on npm or in latest is pre-built. For everything else you would have to build up the necessary files yourself. You can checkout npm-git.sh and our package.json for more details.

@greggmojica
Copy link

Any update here?

@flovilmart
Copy link
Contributor

It’s. 2 year old issue that is closed, not sure what update you’re expecting. Please open a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

7 participants