Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple node_modules Installed But Not Copied to Website Production Environment #409

Closed
capraynor opened this issue Oct 31, 2019 · 6 comments
Assignees

Comments

@capraynor
Copy link

There should be multiple node_modules in my project when the npm install command completed.

But not all the node_modules directory correctly copied to the production website directory.

Repro Steps:

This is my example project.

https://github.com/capraynor/kudu-bug-multiple-node-modules-not-copied-correctly

When I deployed this project to azure web app, I cannot see /home/site/wwwroot/another-directory/node_modules using ssh in advanced tools.

But I can see /tmp/the-hash/another-directory/node_modules using Bash in advanced tools

I really have no idea on this. Could you help us to figure this out? Thanks!

I'm using the following technologies:

Azure app service Local Git
Node.js 10.15
Azure Linux App Service
Looking forward for your reply!

@capraynor
Copy link
Author

Still not solved on azure app service, linux instance.

#171

@arroyc
Copy link
Contributor

arroyc commented Nov 4, 2019

@capraynor .. thanks for reporting … can you help me repro this issue by providing little more information as following?
region of your webapp
from build log you can see oryx version
will be nice to know the node_modules which are not getting copied

I'm also trying to repro this with my sample app, but it is always nice to compare apple to apple, so the above information will help a lot troubleshooting this problem

@arroyc arroyc self-assigned this Nov 4, 2019
@PerssonP
Copy link

PerssonP commented Nov 5, 2019

@arroyc I'm having the same issue in my project. Oryx logs that it's installed the node modules but it never moves them to the destination directory. Below is my build logs. Efter deployment there are no node_modules or node_modules.tar.gz in home/site/wwwroot.
Oryx version 0.2.20191004.5.

2019-11-05T12:33:05 Updating branch 'master'.
2019-11-05T12:33:06 Updating submodules.
2019-11-05T12:33:06 Preparing deployment for commit id '7148b0f93c'.
2019-11-05T12:33:06 Oryx-Build: Running kudu sync...
2019-11-05T12:33:06 Command: kudusync -v 50 -f /home/site/repository -t /home/site/wwwroot -n /home/site/deployments/7148b0f93c73451c01eac21cbc3b804de6ae75d0/manifest -p /home/site/deployments/307b6fa525a708eb46942099c8922cd9a8f8a459/manifest -i ".git;.hg;.deployment;.deploy.sh"
2019-11-05T12:33:07 Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot'
2019-11-05T12:33:07 Copying file: 'instructions.txt'
2019-11-05T12:33:07 Ignoring: .git
2019-11-05T12:33:07 Running oryx build...
2019-11-05T12:33:07 Command: oryx build /home/site/wwwroot -o /home/site/wwwroot --platform nodejs --platform-version 12.9 -i /tmp/8d761ec4f3dc59b -p compress_node_modules=tar-gz --log-file /tmp/test.log
2019-11-05T12:33:11 Build orchestrated by Microsoft Oryx, https://github.com/Microsoft/Oryx
2019-11-05T12:33:11 You can report issues at https://github.com/Microsoft/Oryx/issues
2019-11-05T12:33:11
2019-11-05T12:33:11 Oryx Version : 0.2.20191004.5, Commit: 95ca7f5
2019-11-05T12:33:11 Build Operation ID: |M2yAXehme/Y=.325cc9e8_
2019-11-05T12:33:11 Repository Commit : 7148b0f93c73451c01eac21cbc3b804de6ae75d0
2019-11-05T12:33:11
2019-11-05T12:33:13 Using intermediate directory '/tmp/8d761ec4f3dc59b'.
2019-11-05T12:33:13
2019-11-05T12:33:13 Copying files to the intermediate directory...
2019-11-05T12:33:14 Done in 1 sec(s).
2019-11-05T12:33:14
2019-11-05T12:33:14 Source directory : /tmp/8d761ec4f3dc59b
2019-11-05T12:33:14 Destination directory: /home/site/wwwroot
2019-11-05T12:33:14
2019-11-05T12:33:14
2019-11-05T12:33:14 Using Node version:
2019-11-05T12:33:15 v12.9.1
2019-11-05T12:33:15
2019-11-05T12:33:15 Using Npm version:
2019-11-05T12:33:17 6.9.0
2019-11-05T12:33:17
2019-11-05T12:33:17 Running 'npm install'...
2019-11-05T12:33:17
2019-11-05T12:33:20
2019-11-05T12:33:20 > testing@1.0.0 install /tmp/8d761ec4f3dc59b
2019-11-05T12:33:20 > cd server && npm install --production
2019-11-05T12:33:20
2019-11-05T12:33:54 added 281 packages from 226 contributors and audited 1548 packages in 30.682s
2019-11-05T12:33:54 found 0 vulnerabilities
2019-11-05T12:33:54
2019-11-05T12:33:54 up to date in 33.949s
2019-11-05T12:33:54 found 0 vulnerabilities
2019-11-05T12:33:54
2019-11-05T12:33:54
2019-11-05T12:33:54 Running 'npm run build'...
2019-11-05T12:33:54
2019-11-05T12:33:55
2019-11-05T12:33:55 > testing@1.0.0 build /tmp/8d761ec4f3dc59b
2019-11-05T12:33:55 > echo Empty echo
2019-11-05T12:33:55
2019-11-05T12:33:56 Empty echo
2019-11-05T12:33:56
2019-11-05T12:33:56 Copying files to destination directory '/home/site/wwwroot'...
2019-11-05T12:33:57 Done in 1 sec(s).
2019-11-05T12:33:57
2019-11-05T12:33:57 Removing existing manifest file
2019-11-05T12:33:57 Creating a manifest file...
2019-11-05T12:33:57 Manifest file created.
2019-11-05T12:33:57
2019-11-05T12:33:57 Done in 44 sec(s).
2019-11-05T12:33:58 Running post deployment command(s)...
2019-11-05T12:33:59 Deployment successful.
2019-11-05T12:34:01 App container will begin restart within 10 seconds.

@arroyc
Copy link
Contributor

arroyc commented Nov 6, 2019

@capraynor thanks for detail logs, I was able to repro the issue and working on the fix. In the mean time I would suggest you to build the app locally and use deploy the built code to azure app service. You can use vs code to do it. Let me know if this works till we get a fix.

@arroyc arroyc added the bug Something isn't working label Nov 6, 2019
@capraynor
Copy link
Author

capraynor commented Nov 6, 2019

@arroyc Sorry that is not my log.

The app service is located in Central US.
Please just deploy that repo into an app service, node.js latest version (NOT LTS), Linux. you will see that in runtime directory, ./another-directory/node_modules not exists

@MrTwiggles
Maybe you mean that you cannot find ./node_modules. Please find your node_modules in /node_modules but not ./node_modules. That's their strategy, not really sure why it have such kind of strategy.
IMHO, you need to open another issue for this.

@gpcastro
Copy link
Member

This should be solved by now. Let us know if you can still this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants