Following the installation instructions runs into an error with rxjs peerDependencies requirements.
Followed the instructions on the main page.
$ git clone https://github.com/kamilmysliwiec/nest-typescript-starter.git project $ cd project $ npm install $ npm run start
This runs into an error with the message
"The package [email protected] does not satisfy its siblings' peerDependencies requirements!"
@jiminssy You can specify your environment? node, npm and typescript versions.
Try ts-node update
npm install [email protected] --save
Hey guys! I saw that nestjs packages require [email protected]. Try to fix the rxjs dependency to that version.
Guys @ThomRick @cdiaz @jiminssy , the problem is here:
The main https://github.com/kamilmysliwiec/nest/blob/master/package.json file have:
"rxjs": "^5.4.0",
But submodules like websockets, websockets, core have:
"rxjs": "^5.0.3"
Maybe some1 will prepare PR to update submodule package.json's up to 5.4.0?
I temporarily changed the line in package.json from "rxjs": "^5.4.0" to "rxjs": "5.0.3" And npm install worked fine.
Then I tried doing npm run start and not able to compile Typescript error showed up. I checked the package.json and the ts-node version was "ts-node": "^2.1.0" So as @cdiaz suggested, I installed specifically the version 3.2.0 and now I am getting
SyntaxError: Unexpected token { at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Module._extensions..js (module.js:416:10)
this error.
Could someone help me out on how to get Nest to be built and run out of the box from Master branch? Are there some steps I am missing besides the main documentation?
@jiminssy because of this:
"typescript": "^2.2.1"
instead of this:
"typescript": "~2.2.1"
after npm install please run npm install [email protected] and then npm start
@cojack I did as you instructed but still the same problem of
SyntaxError: Unexpected token {
@jiminssy this is all from my flow:
~/Projects/private ⌚ 20:29:48
$ git clone https://github.com/kamilmysliwiec/nest.git ./nest-temp
Cloning into './nest-temp'...
remote: Counting objects: 2360, done.
remote: Total 2360 (delta 0), reused 0 (delta 0), pack-reused 2360
Receiving objects: 100% (2360/2360), 435.74 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1393/1393), done.
~/Projects/private ⌚ 20:29:59
$ node -v
v7.3.0
~/Projects/private ⌚ 20:30:02
$ cd nest-temp
~/Projects/private/nest-temp on î‚ master ⌚ 20:30:09
$ npm i
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
> [email protected] install /home/cojack/Projects/private/nest-temp/node_modules/fsevents
> node install
> [email protected] postinstall /home/cojack/Projects/private/nest-temp
> opencollective postinstall
.,;riS522225isr:,.
.;sS2XXXXXXXXXXXXX22Sr;.
:s2XXXXXXXXXXXXXXXXXXXXXi,
:i2XXXXXXX2Sirrrrrri52X2s:
.r2XXXXXX2s;,. .,;: .:,
.sXXXXXX2r, .:;;;:
rXXXXXXS: ,;;;;;;,
:2XXXXX5, .;;;;;;;.
iXXXXXX; ,;;;;;;:
2XXXXX2, .;;;;;;;
2XXXXX2, .;;;;;;;
iXXXXXX; ,;;;;;;:
:2XXXXX5, .;;;;;;;.
rXXXXXX5: ,;;;;;;,
.sXXXXXX2r, .:;;;,
r2XXXXXX2s;,. .,;: .:,
,s2XXXXXXX2Ssrr;;rriS2X2s:
:s2XXXXXXXXXXXXXXXXXXXXXi,
.;sS2XXXXXXXXXXXXXX2Ss;.
.,;riS222222Sir;,.
Thanks for installing nestjs
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 6
Number of backers: 1
Annual budget: US$Â 4
Current balance: US$Â 4
Donate: https://opencollective.com/nest/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @nestjs/[email protected] requires a peer of [email protected] but none was installed.
npm WARN @nestjs/[email protected] requires a peer of [email protected] but none was installed.
npm WARN @nestjs/[email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] No repository field.
added 1059 packages in 32.697s
~/Projects/private/nest-temp on î‚ master! ⌚ 20:30:49
$ npm install [email protected]
npm WARN [email protected] No repository field.
+ [email protected]
updated 1 package in 3.326s
~/Projects/private/nest-temp on î‚ master! ⌚ 20:31:04
$ npm start
> [email protected] start /home/cojack/Projects/private/nest-temp
> nodemon -e ts --watch src index.js
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /home/cojack/Projects/private/nest-temp/src/**/*
[nodemon] starting `node index.js`
[Nest] 13666 - 2017-7-12 20:31:22 [NestFactory] Starting Nest application...
[Nest] 13666 - 2017-7-12 20:31:22 [InstanceLoader] ApplicationModule dependencies initialized
[Nest] 13666 - 2017-7-12 20:31:22 [InstanceLoader] UsersModule dependencies initialized
[Nest] 13666 - 2017-7-12 20:31:22 [NestMicroservice] Nest microservice is ready!
[Nest] 13666 - 2017-7-12 20:31:22 [RoutesResolver] ClientController:
[Nest] 13666 - 2017-7-12 20:31:22 [RouterExplorer] Mapped {/client, GET} route
[Nest] 13666 - 2017-7-12 20:31:22 [RoutesResolver] UsersController:
[Nest] 13666 - 2017-7-12 20:31:22 [RouterExplorer] Mapped {/, GET} route
[Nest] 13666 - 2017-7-12 20:31:22 [RouterExplorer] Mapped {/:id, GET} route
[Nest] 13666 - 2017-7-12 20:31:22 [RouterExplorer] Mapped {/, POST} route
[Nest] 13666 - 2017-7-12 20:31:22 [NestApplication] Nest application is ready!
Application listen on port: 3001
All microservices are listening...
[nodemon] clean exit - waiting for changes before restart
^C
~/Projects/private/nest-temp on î‚ master! ⌚ 20:31:24
commands starts with $
Oh geez, sorry about this. I had really old Node running version 4. I upgraded my Node to the latest stable 6.11.1 and everything is working. Thank you for the prompt answers.
@jiminssy sorry about that, this is what I mention in issue #101 that engine should be added to the package.json to avoid this kind of problems.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.