realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

fail to start the server #341

Closed wakaryry closed 6 years ago

wakaryry commented 6 years ago
$ ros init myApp
Creating 'myApp'.
◥ Installing dependencies... A little patience is good.undefined
$ cd /Users/X/myApp/
$ npm start

> my-ros-app@1.0.0 start /Users/X/myApp
> npm run build && node dist/index.js

> my-ros-app@1.0.0 build /Users/X/myApp
> rm -rf dist; ./node_modules/.bin/tsc

sh: ./node_modules/.bin/tsc: No such file or directory
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! my-ros-app@1.0.0 build: `rm -rf dist; ./node_modules/.bin/tsc`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the my-ros-app@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/X/.npm/_logs/2018-01-27T12_56_31_303Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-ros-app@1.0.0 start: `npm run build && node dist/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my-ros-app@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/X/.npm/_logs/2018-01-27T12_56_31_332Z-debug.log

Version of Realm and Tooling

It says: Installing dependencies... A little patience is good.undefined What undefined means?

2018-01-27T12_56_31_332Z-debug.log

Need HELP!

bigfish24 commented 6 years ago

Run npm install —save typescript in the project folder, it appears that didn’t install properly.

wakaryry commented 6 years ago
$ ros init hello
$ cd /.../hello
$ npm install --save typescript
$ npm start

Then it says:

> my-ros-app@1.0.0 start /Users/dafangyang/hello
> npm run build && node dist/index.js

> my-ros-app@1.0.0 build /Users/dafangyang/hello
> rm -rf dist; ./node_modules/.bin/tsc

src/index.ts(1,29): error TS2307: Cannot find module 'realm-object-server'.
src/index.ts(2,23): error TS2307: Cannot find module 'path'.
src/index.ts(8,29): error TS2304: Cannot find name '__dirname'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-ros-app@1.0.0 build: `rm -rf dist; ./node_modules/.bin/tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the my-ros-app@1.0.0 build 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!     /Users/dafangyang/.npm/_logs/2018-01-27T18_52_55_651Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-ros-app@1.0.0 start: `npm run build && node dist/index.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the my-ros-app@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
nirinchev commented 6 years ago

Can you try running npm install?

wakaryry commented 6 years ago

npm install in the project folder.

$ npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN my-ros-app@1.0.0 No repository field.
npm WARN my-ros-app@1.0.0 No license field.
npm WARN The package typescript is included as both a dev and production dependency.
wakaryry commented 6 years ago

Actually when I used npm to install realm-object-server, and the source is https://registry.npmjs.org/, npm throws a error: cb() never called.

Then I changed the source to registry.npm.taobao.org/ in China. npm install realm-object-server can not fetch data.

Then I changed npm into cnpm. cnpm is the same with npm, but it download packages from source in China. cnpm could install realm-object-server, but some packges like realm-sync-server was in s3.amazon. It's slow to dowmload it from China. I tried several times, even used a vpn (but a packge include parts need a vpn, some do not, the install broke times since the network).

I got excited when the install was finished, but, oh no.

bmunkholm commented 6 years ago

Hi @wakaryry, Perhaps it will much easier for you to use the cloud service we are building now. HAve you signed up at https://cloud.realm.io/?