deploy fails with: no such file or directory, open 'app/npm-follower/lib/broadcast.js'
dougtoppin opened this issue · 2 comments
On a Cloud9 instance with node v10.15.3 I am getting this error on the deploy:
Error: ENOENT: no such file or directory, open 'app/npm-follower/lib/broadcast.js'
I am guessing that I am doing something wrong but reproduced this twice. In looking at ChangeLogs-md.js I think that the NpmFollower copydir is not copying /app/lib to app/npm-follower/lib but I am not sure why.
Steps to reproduce:
- nvm i 10.15.3
- npm run-script setup
- npm run-script deploy
Full log:
$ npm run-script setup
> @ setup /home/ec2-user/environment/aws-cdk-changelogs-demo
> npm install; cd app; npm install
npm WARN aws-cdk-changelogs-demo No repository field.
npm WARN aws-cdk-changelogs-demo No license field.
added 948 packages from 1433 contributors and audited 28506 packages in 15.722s
found 6 vulnerabilities (1 moderate, 5 high)
run `npm audit fix` to fix them, or `npm audit` for details
npm WARN app No description
npm WARN app No repository field.
npm WARN app No license field.
added 417 packages from 1014 contributors and audited 1473 packages in 7.856s
found 9 vulnerabilities (6 low, 2 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
$ npm run-script deploy
> @ deploy /home/ec2-user/environment/aws-cdk-changelogs-demo
> cdk deploy
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open 'app/npm-follower/lib/broadcast.js'
at Object.openSync (fs.js:438:3)
at Object.writeFileSync (fs.js:1189:35)
at /home/ec2-user/environment/aws-cdk-changelogs-demo/node_modules/copy-dir/index.js:193:8
at Array.map (<anonymous>)
at FileTools.copyfileSync (/home/ec2-user/environment/aws-cdk-changelogs-demo/node_modules/copy-dir/index.js:191:8)
at Function.copy.sync (/home/ec2-user/environment/aws-cdk-changelogs-demo/node_modules/copy-dir/index.js:226:9)
at new NpmFollower (/home/ec2-user/environment/aws-cdk-changelogs-demo/changelogs-md.js:188:13)
at new NpmFollowerApp (/home/ec2-user/environment/aws-cdk-changelogs-demo/changelogs-md.js:522:24)
at Object.<anonymous> (/home/ec2-user/environment/aws-cdk-changelogs-demo/changelogs-md.js:565:1)
at Module._compile (internal/modules/cjs/loader.js:701:30)
Subprocess exited with error 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ deploy: `cdk deploy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Verbose log output:
$ cat /home/ec2-user/.npm/_logs/2019-04-28T14_57_31_954Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/ec2-user/.nvm/versions/node/v10.15.3/bin/node',
1 verbose cli '/home/ec2-user/.nvm/versions/node/v10.15.3/bin/npm',
1 verbose cli 'run-script',
1 verbose cli 'deploy' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info lifecycle @~predeploy: @
6 info lifecycle @~deploy: @
7 verbose lifecycle @~deploy: unsafe-perm in lifecycle true
8 verbose lifecycle @~deploy: PATH: /home/ec2-user/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ec2-user/environment/aws-cdk-changelogs-demo/node_modules/.bin:/home/ec2-user/.nvm/versions/node/v10.15.3/bin:/home/ec2-user/.rvm/gems/ruby-2.6.0/bin:/home/ec2-user/.rvm/gems/ruby-2.6.0@global/bin:/home/ec2-user/.rvm/rubies/ruby-2.6.0/bin:/usr/local/bin:/bin:/usr/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/home/ec2-user/.rvm/bin
9 verbose lifecycle @~deploy: CWD: /home/ec2-user/environment/aws-cdk-changelogs-demo
10 silly lifecycle @~deploy: Args: [ '-c', 'cdk deploy' ]
11 silly lifecycle @~deploy: Returned: code: 1 signal: null
12 info lifecycle @~deploy: Failed to exec deploy script
13 verbose stack Error: @ deploy: `cdk deploy`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/ec2-user/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/home/ec2-user/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /home/ec2-user/environment/aws-cdk-changelogs-demo
16 verbose Linux 4.14.109-80.92.amzn1.x86_64
17 verbose argv "/home/ec2-user/.nvm/versions/node/v10.15.3/bin/node" "/home/ec2-user/.nvm/versions/node/v10.15.3/bin/npm" "run-script" "deploy"
18 verbose node v10.15.3
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error @ deploy: `cdk deploy`
22 error Exit status 1
23 error Failed at the @ deploy script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I thought it might have something to do with the Cloud9 environment and my using nvm to update the node version but interestingly I have exactly the same error when doing the same on my MacBook Air (10.14.4) with:
$ which node
/usr/local/bin/node
$ node --version
v10.15.3
I created a symlink to ../lib
in the app/npm-follower
directory. Worked great.