Skip to content

pm2 deploy 时总是报无法找到某个模块 #5

@Nodewebzsz

Description

@Nodewebzsz

本地package.json文件都有这些模块,但是拉去代码到服务器之后执行deploy就报这个错误,到服务器端到production文件夹去看时没问题的

--> Deploying to production environment --> on host 39.105.73.230 fatal: no upstream configured for branch 'master' ○ deploying origin/master ○ executing pre-deploy-local ○ hook pre-deploy ○ fetching updates ○ full fetch Fetching origin ○ resetting HEAD to origin/master HEAD is now at c22d75d fix ○ executing post-deploy export NODE_ENV=production && cnpm install && node build/build.js && pm2 startOrRestartecosystem.json --env production`
[1/15] fastclick@^1.0.6 installed at node_modules/_fastclick@1.0.6@fastclick
[2/15] lyric-parser@^1.0.1 installed at node_modules/_lyric-parser@1.0.1@lyric-parser
[3/15] js-base64@^2.1.9 installed at node_modules/_js-base64@2.4.8@js-base64
[4/15] jsonp@^0.2.1 installed at node_modules/_jsonp@0.2.1@jsonp
[5/15] good-storage@^1.0.1 installed at node_modules/_good-storage@1.0.1@good-storage
[6/15] vue-lazyload@^1.0.5 installed at node_modules/_vue-lazyload@1.2.6@vue-lazyload
[7/15] axios@^0.16.2 installed at node_modules/_axios@0.16.2@axios
[8/15] better-scroll@^0.4.0 installed at node_modules/_better-scroll@0.4.0@better-scroll
[9/15] vue-router@^2.3.1 installed at node_modules/_vue-router@2.8.1@vue-router
[10/15] socks@^2.2.1 installed at node_modules/_socks@2.2.1@socks
[11/15] vuex@^2.3.1 installed at node_modules/_vuex@2.5.0@vuex
[12/15] vue@^2.3.3 installed at node_modules/_vue@2.5.17@vue
[13/15] create-keyframe-animation@^0.1.0 installed at node_modules/_create-keyframe-animation@0.1.0@create-keyframe-animation
[14/15] babel-runtime@^6.23.0 installed at node_modules/_babel-runtime@6.26.0@babel-runtime
[15/15] babel-polyfill@^6.23.0 installed at node_modules/_babel-polyfill@6.26.0@babel-polyfill
Recently updated (since 2018-07-28): 2 packages (detail see file /home/zsz_user/www/website/production/source/node_modules/.recently_updates.txt)
2018-08-02
→ axios@0.16.2 › follow-redirects@^1.2.3(1.5.2) (02:34:57)
→ vue@^2.3.3(2.5.17) (03:31:34)
All packages installed (42 packages installed from npm registry, used 2s(network 2s), speed 1.58MB/s, json 40(387.09kB), tarball 2.18MB)
module.js:471
throw err;
^

Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/zsz_user/www/website/production/source/build/check-versions.js:1:75)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

post-deploy hook failed

Deploy failed`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions