Giter Club home page Giter Club logo

Comments (14)

taylonr avatar taylonr commented on August 28, 2024

What error are you getting?

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

[email protected] db:create:test C:\Users\Kenny\Desktop\PostmanProject\postman
cross-env NODE_ENV=test ./node_modules/.bin/sequelize db:create && cross-env NODE_ENV=test npm run db:migrate && cross-env NODE_ENV=test npm run db:seed

'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] db:create:test: cross-env NODE_ENV=test ./node_modules/.bin/sequelize db:create && cross-env NODE_ENV=test npm run db:migrate && cross-env NODE_ENV=test npm run db:seed
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] db:create:test 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\Kenny\AppData\Roaming\npm-cache_logs\2019-12-11T18_10_50_202Z-debug.log

C:\Users\Kenny\Desktop\PostmanProject\postman>

from postman.

taylonr avatar taylonr commented on August 28, 2024

Have you run npm install?

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

I have but i can run it again

This is what my confiq file look like

{
"development": {
"username": "postgres",
"password": null,
"database": "postman_dev",
"host": "localhost",
"port": 5432,
"dialect": "postgres"
},
"test": {
"username": "postgres",
"password": null,
"database": "postman_test",
"host": "localhost",
"port": 5432,
"dialect": "postgres"
}
}

from postman.

taylonr avatar taylonr commented on August 28, 2024

The error you're getting is "'cross-env' is not recognized as an internal or external command,"

cross-env is an npm package. If running npm-install does not work, try installing it individually npm i -d cross-env

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

Hi Taylor
Below is the error I'M getting after install npm i -d cross-env
Error: spawn node_modules.bin\sequelize ENOENT
at notFoundError (C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
Emitted 'error' event at:
at ChildProcess.cp.emit (C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] db:create:test: `cross-env NODE_ENV=test ./node_modules/.bin/sequelize db:create && cross-env NODE_ENV=test npm run db:migrate && cross-env NODE_ENV=test np

from postman.

taylonr avatar taylonr commented on August 28, 2024

can you try deleting your node_modules folder (C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules) and then run npm install again from C:\Users\Kenny\Desktop\PostmanProject\postman?

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

it still says i have npm 6.9 after deleting the node_module

from postman.

taylonr avatar taylonr commented on August 28, 2024

Ok, now run npm install and let me know if there are any errors.

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

This i9s the error i now get

[email protected] postinstall C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

[email protected] postinstall C:\Users\Kenny\Desktop\PostmanProject\postman\node_modules\nodemon
node bin/postinstall || exit 0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1006 packages from 950 contributors and audited 882187 packages in 58.953s
found 33 vulnerabilities (8 low, 3 moderate, 19 high, 3 critical)
run npm audit fix to fix them, or npm audit for details

from postman.

taylonr avatar taylonr commented on August 28, 2024

I don't actually see an error there. I seek a warning for an optional dependency which is ok.

If you run the "db:create:test" command now are you getting any errors.

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

I got this
C:\Users\Kenny\Desktop\PostmanProject\postman>npm run db:create:test

[email protected] db:create:test C:\Users\Kenny\Desktop\PostmanProject\postman
cross-env NODE_ENV=test ./node_modules/.bin/sequelize db:create && cross-env NODE_ENV=test npm run db:migrate && cross-env NODE_ENV=test npm run db:seed

Sequelize CLI [Node: 10.16.3, CLI: 3.2.0, ORM: 4.44.3]

WARNING: This version of Sequelize CLI is not fully compatible with Sequelize v4. https://github.com/sequelize/cli#sequelize-support

Loaded configuration file "server\config\config.json".
Using environment "test".
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules\sequelize\lib\sequelize.js:245:13
Database postman_test created.

[email protected] db:migrate C:\Users\Kenny\Desktop\PostmanProject\postman
sequelize db:migrate

Sequelize CLI [Node: 10.16.3, CLI: 3.2.0, ORM: 4.44.3]

WARNING: This version of Sequelize CLI is not fully compatible with Sequelize v4. https://github.com/sequelize/cli#sequelize-support

Loaded configuration file "server\config\config.json".
Using environment "test".
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules\sequelize\lib\sequelize.js:245:13
== 20170821002306-create-account: migrating =======
== 20170821002306-create-account: migrated (0.029s)

== 20170830004512-create-book: migrating =======
== 20170830004512-create-book: migrated (0.018s)

== 20170830004814-create-household: migrating =======
== 20170830004814-create-household: migrated (0.016s)

== 20170830005147-create-user: migrating =======
== 20170830005147-create-user: migrated (0.026s)

== 20171011010437-create-wishlist: migrating =======
== 20171011010437-create-wishlist: migrated (0.022s)

[email protected] db:seed C:\Users\Kenny\Desktop\PostmanProject\postman
sequelize db:seed:all

Sequelize CLI [Node: 10.16.3, CLI: 3.2.0, ORM: 4.44.3]

WARNING: This version of Sequelize CLI is not fully compatible with Sequelize v4. https://github.com/sequelize/cli#sequelize-support

Loaded configuration file "server\config\config.json".
Using environment "test".
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules\sequelize\lib\sequelize.js:245:13
File: data does not match pattern: /.js$/
File: data does not match pattern: /.js$/
File: data does not match pattern: /.js$/
== 20170821010043-init: migrating =======
== 20170821010043-init: migrated (0.017s)

== 20170830010805-add-books: migrating =======
== 20170830010805-add-books: migrated (0.008s)

C:\Users\Kenny\Desktop\PostmanProject\postman>

from postman.

taylonr avatar taylonr commented on August 28, 2024

So looks like you now have a test database set up in your postgres.

That is, that looks to be a successful run, so I think you should be good to go.

from postman.

kennyagboola avatar kennyagboola commented on August 28, 2024

Thanks Taylonr for all the help, I really grateful. It is all now setup

from postman.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.