容器正在引用一个不存在的dataSource:" storage"

时间:2017-07-07 05:06:07

标签: node.js heroku strongloop

我想为上传图片添加功能,我正在尝试在heroku上运行strongloop应用程序时遇到以下错误,它之前没有添加环回存储组件。

请提前帮助我解决此错误。

"storage": {
    "name": "storage",
    "connector": "loopback-component-storage",
    "provider": "filesystem",
    "root": "./server/storage"
}



F:\jobMngtHeroku>heroku logs
     !    heroku-cli: This CLI is deprecated. Please reinstall from
     !    https://cli.heroku.com
    2017-07-07T04:18:48.744742+00:00 app[web.1]:     at tryModuleLoad (module.js:466
    :12)
    2017-07-07T04:18:48.744743+00:00 app[web.1]:     at Function.Module._load (modul
    e.js:458:3)
    2017-07-07T04:18:48.744744+00:00 app[web.1]:     at Function.Module.runMain (mod
    ule.js:605:10)
    2017-07-07T04:18:48.744744+00:00 app[web.1]:     at startup (bootstrap_node.js:1
    58:16)
    2017-07-07T04:18:48.744745+00:00 app[web.1]:     at bootstrap_node.js:575:3
    2017-07-07T04:18:48.764850+00:00 app[web.1]: npm ERR! code ELIFECYCLE
    2017-07-07T04:18:48.765071+00:00 app[web.1]: npm ERR! errno 1
    2017-07-07T04:18:48.765436+00:00 app[web.1]: npm ERR! jobMngt@1.0.0 start: `node
     .`
    2017-07-07T04:18:48.765437+00:00 app[web.1]: npm ERR! Exit status 1
    2017-07-07T04:18:48.765438+00:00 app[web.1]: npm ERR!
    2017-07-07T04:18:48.765530+00:00 app[web.1]: npm ERR! Failed at the jobMngt@1.0.
    0 start script.
    2017-07-07T04:18:48.765650+00:00 app[web.1]: npm ERR! This is probably not a pro
    blem with npm. There is likely additional logging output above.
    2017-07-07T04:18:48.766780+00:00 app[web.1]:
    2017-07-07T04:18:48.767054+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-0
    7-07T04_18_48_762Z-debug.log
    2017-07-07T04:18:48.766955+00:00 app[web.1]: npm ERR! A complete log of this run
     can be found in:
    2017-07-07T04:18:48.829064+00:00 heroku[web.1]: Process exited with status 1
    2017-07-07T04:18:48.844400+00:00 heroku[web.1]: State changed from starting to c
    rashed
    2017-07-07T04:18:48.845234+00:00 heroku[web.1]: State changed from crashed to st
    arting
    2017-07-07T04:18:53.518273+00:00 heroku[web.1]: Starting process with command `n
    pm start`
    2017-07-07T04:18:56.325443+00:00 app[web.1]:
    2017-07-07T04:18:56.325455+00:00 app[web.1]: > jobMngt@1.0.0 start /app
    2017-07-07T04:18:56.325456+00:00 app[web.1]: > node .
    2017-07-07T04:18:56.325456+00:00 app[web.1]:
    2017-07-07T04:18:57.672869+00:00 app[web.1]: assert.js:60
    2017-07-07T04:18:57.672881+00:00 app[web.1]:   throw new errors.AssertionError({

    2017-07-07T04:18:57.672882+00:00 app[web.1]:   ^
    2017-07-07T04:18:57.672882+00:00 app[web.1]:
    2017-07-07T04:18:57.672884+00:00 app[web.1]: AssertionError [ERR_ASSERTION]: con
    tainer is referencing a dataSource that does not exist: "storage"
    2017-07-07T04:18:57.672885+00:00 app[web.1]:     at configureModel (/app/node_mo
    dules/loopback/lib/application.js:454:5)
    2017-07-07T04:18:57.672885+00:00 app[web.1]:     at Function.app.model (/app/nod
    e_modules/loopback/lib/application.js:140:5)
    2017-07-07T04:18:57.672886+00:00 app[web.1]:     at /app/node_modules/loopback-b
    oot/lib/executor.js:203:9
    2017-07-07T04:18:57.672887+00:00 app[web.1]:     at Array.forEach (native)
    2017-07-07T04:18:57.672888+00:00 app[web.1]:     at setupModels (/app/node_modul
    es/loopback-boot/lib/executor.js:199:23)
    2017-07-07T04:18:57.672889+00:00 app[web.1]:     at execute (/app/node_modules/l
    oopback-boot/lib/executor.js:40:3)
    2017-07-07T04:18:57.672889+00:00 app[web.1]:     at bootLoopBackApp (/app/node_m
    odules/loopback-boot/index.js:154:3)
    2017-07-07T04:18:57.672890+00:00 app[web.1]:     at Object.<anonymous> (/app/ser
    ver/server.js:23:1)
    2017-07-07T04:18:57.672891+00:00 app[web.1]:     at Module._compile (module.js:5
    69:30)
    2017-07-07T04:18:57.672891+00:00 app[web.1]:     at Object.Module._extensions..j
    s (module.js:580:10)
    2017-07-07T04:18:57.672892+00:00 app[web.1]:     at Module.load (module.js:503:3
    2)
    2017-07-07T04:18:57.672893+00:00 app[web.1]:     at tryModuleLoad (module.js:466
    :12)
    2017-07-07T04:18:57.672893+00:00 app[web.1]:     at Function.Module._load (modul
    e.js:458:3)
    2017-07-07T04:18:57.672894+00:00 app[web.1]:     at Function.Module.runMain (mod
    ule.js:605:10)
    2017-07-07T04:18:57.672895+00:00 app[web.1]:     at startup (bootstrap_node.js:1
    58:16)
    2017-07-07T04:18:57.672895+00:00 app[web.1]:     at bootstrap_node.js:575:3
    2017-07-07T04:18:57.696132+00:00 app[web.1]: npm ERR! code ELIFECYCLE
    2017-07-07T04:18:57.696366+00:00 app[web.1]: npm ERR! errno 1
    2017-07-07T04:18:57.696514+00:00 app[web.1]: npm ERR! jobMngt@1.0.0 start: `node
     .`
    2017-07-07T04:18:57.696634+00:00 app[web.1]: npm ERR! Exit status 1
    2017-07-07T04:18:57.696692+00:00 app[web.1]: npm ERR!
    2017-07-07T04:18:57.696759+00:00 app[web.1]: npm ERR! Failed at the jobMngt@1.0.
    0 start script.
    2017-07-07T04:18:57.696815+00:00 app[web.1]: npm ERR! This is probably not a pro
    blem with npm. There is likely additional logging output above.
    2017-07-07T04:18:57.697746+00:00 app[web.1]:
    2017-07-07T04:18:57.697881+00:00 app[web.1]: npm ERR! A complete log of this run
     can be found in:
    2017-07-07T04:18:57.697917+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-0
    7-07T04_18_57_690Z-debug.log
    2017-07-07T04:18:57.788117+00:00 heroku[web.1]: State changed from starting to c
    rashed
    2017-07-07T04:18:57.777532+00:00 heroku[web.1]: Process exited with status 1
    2017-07-07T04:19:11.704407+00:00 heroku[router]: at=error code=H10 desc="App cra
    shed" method=GET path="/" host=jobmanagementcoreapi.herokuapp.com request_id=209
    466dc-60ed-4aa2-9ff5-2baa89241d14 fwd="115.96.173.240" dyno= connect= service= s
    tatus=503 bytes= protocol=https
    2017-07-07T04:24:31.000000+00:00 app[api]: Build started by user nkagade@gmail.c
    om
    2017-07-07T04:24:47.347685+00:00 app[api]: Release v13 created by user nkagade@g
    mail.com
    2017-07-07T04:24:47.347685+00:00 app[api]: Deploy 6e5eb3f1 by user nkagade@gmail
    .com
    2017-07-07T04:24:31.000000+00:00 app[api]: Build succeeded
    2017-07-07T04:24:49.032611+00:00 heroku[web.1]: State changed from crashed to st
    arting
    2017-07-07T04:24:52.291766+00:00 heroku[web.1]: Starting process with command `n
    pm start`
    2017-07-07T04:24:55.080829+00:00 app[web.1]: > jobMngt@1.0.0 start /app
    2017-07-07T04:24:55.080815+00:00 app[web.1]:
    2017-07-07T04:24:55.080831+00:00 app[web.1]:
    2017-07-07T04:24:55.080830+00:00 app[web.1]: > node .
    2017-07-07T04:24:56.723361+00:00 app[web.1]: /app/node_modules/loopback/lib/appl
    ication.js:246
    2017-07-07T04:24:56.723378+00:00 app[web.1]:     throw err;
    2017-07-07T04:24:56.723379+00:00 app[web.1]:     ^
    2017-07-07T04:24:56.723380+00:00 app[web.1]:
    2017-07-07T04:24:56.723382+00:00 app[web.1]: Error: Cannot create data source "s
    torage": Cannot initialize connector "loopback-component-storage": FileSystemPro
    vider: Path does not exist: ./server/storage
    2017-07-07T04:24:56.723384+00:00 app[web.1]:     at new FileSystemProvider (/app
    /node_modules/loopback-component-storage/lib/providers/filesystem/index.js:35:11
    )
    2017-07-07T04:24:56.723385+00:00 app[web.1]:     at Object.module.exports.create
    Client (/app/node_modules/loopback-component-storage/lib/providers/filesystem/in
    dex.js:27:10)
    2017-07-07T04:24:56.723403+00:00 app[web.1]:     at new StorageService (/app/nod
    e_modules/loopback-component-storage/lib/storage-service.js:35:25)
    2017-07-07T04:24:56.723402+00:00 app[web.1]:     at Object.createClient (/app/no
    de_modules/loopback-component-storage/lib/factory.js:100:18)
    2017-07-07T04:24:56.723405+00:00 app[web.1]:     at DataSource.setup (/app/node_
    modules/loopback-datasource-juggler/lib/datasource.js:352:19)
    2017-07-07T04:24:56.723404+00:00 app[web.1]:     at Object.exports.initialize (/
    app/node_modules/loopback-component-storage/lib/storage-connector.js:18:19)
    2017-07-07T04:24:56.723406+00:00 app[web.1]:     at Registry.createDataSource (/
    app/node_modules/loopback/lib/registry.js:355:12)
    2017-07-07T04:24:56.723406+00:00 app[web.1]:     at new DataSource (/app/node_mo
    dules/loopback-datasource-juggler/lib/datasource.js:121:8)
    2017-07-07T04:24:56.723407+00:00 app[web.1]:     at dataSourcesFromConfig (/app/
    node_modules/loopback/lib/application.js:440:19)
    2017-07-07T04:24:56.723408+00:00 app[web.1]:     at Function.app.dataSource (/ap
    p/node_modules/loopback/lib/application.js:235:14)
    2017-07-07T04:24:56.723409+00:00 app[web.1]:     at /app/node_modules/loopback-b
    oot/lib/executor.js:191:9
    2017-07-07T04:24:56.723409+00:00 app[web.1]:     at /app/node_modules/loopback-b
    oot/lib/executor.js:282:5
    2017-07-07T04:24:56.723410+00:00 app[web.1]:     at Array.forEach (native)
    2017-07-07T04:24:56.723411+00:00 app[web.1]:     at forEachKeyedObject (/app/nod
    e_modules/loopback-boot/lib/executor.js:281:20)
    2017-07-07T04:24:56.723412+00:00 app[web.1]:     at setupDataSources (/app/node_
    modules/loopback-boot/lib/executor.js:181:3)
    2017-07-07T04:24:56.723412+00:00 app[web.1]:     at execute (/app/node_modules/l
    oopback-boot/lib/executor.js:39:3)
    2017-07-07T04:24:56.760455+00:00 app[web.1]: npm ERR! code ELIFECYCLE
    2017-07-07T04:24:56.760642+00:00 app[web.1]: npm ERR! errno 1
    2017-07-07T04:24:56.760752+00:00 app[web.1]: npm ERR! jobMngt@1.0.0 start: `node
     .`
    2017-07-07T04:24:56.760872+00:00 app[web.1]: npm ERR! Exit status 1
    2017-07-07T04:24:56.760987+00:00 app[web.1]: npm ERR!
    2017-07-07T04:24:56.761071+00:00 app[web.1]: npm ERR! Failed at the jobMngt@1.0.
    0 start script.
    2017-07-07T04:24:56.761176+00:00 app[web.1]: npm ERR! This is probably not a pro
    blem with npm. There is likely additional logging output above.
    2017-07-07T04:24:56.762258+00:00 app[web.1]:
    2017-07-07T04:24:56.762409+00:00 app[web.1]: npm ERR! A complete log of this run
     can be found in:
    2017-07-07T04:24:56.762474+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-0
    7-07T04_24_56_754Z-debug.log
    2017-07-07T04:24:57.160702+00:00 heroku[web.1]: State changed from starting to c
    rashed
    2017-07-07T04:24:57.138922+00:00 heroku[web.1]: Process exited with status 1
    2017-07-07T04:25:21.276554+00:00 heroku[router]: at=error code=H10 desc="App cra
    shed" method=GET path="/" host=jobmanagementcoreapi.herokuapp.com request_id=c54
    90e4a-a9c8-4692-a503-bf1117cd79e0 fwd="115.96.173.240" dyno= connect= service= s
    tatus=503 bytes= protocol=https

0 个答案:

没有答案