question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to find package.json

See original GitHub issue

Hi,

After upgrading to 1.3.0, I’m unable to package lambda function.

I have a global package.json on root and multiple services with their own serverless.yml. In order to deploy, I use the sls deploy command inside the correct service directory (or using seed services). In 1.3.0, serverless-bundle is looking in the service directory and not at root directory. It result in an error abording the bundle process.

Project
β”œβ”€β”€ package.json
β”œβ”€β”€ services
β”‚   β”œβ”€β”€ service1
β”‚   β”‚   β”œβ”€β”€ serverless.yml
β”‚   β”‚   β”œβ”€β”€ handler.js
β”‚   │── service2
β”‚   β”‚   β”œβ”€β”€ serverless.yml
β”‚   β”‚   β”œβ”€β”€ handler.js

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
clementACcommented, Feb 12, 2020

Perfect everything works now ! Pg-native module excluded, bundled under the right node version and packaged with yarn. Such a great work you do to simplify my life. Thank you.

0reactions
jayaircommented, Feb 12, 2020

@clementAC Thanks for the added info. I didn’t realize that the issue was with the serverless deploy or package command.

Just pushed a fix for this. Try version 1.3.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install gives error "can't find a package.json file"
This is most likely not a problem with npm itself. npm can't find a package.json file in your current directory. Photo. node.jsΒ ...
Read more >
How to fix the npm can't find package.json error
To fix this error, first you need to initialize the package.json by using the following command. npm init -y. Now, you can install...
Read more >
Cannot find package.json file
Cannot find package.json file. When running an NPM build task, you may face the following error: no such file or directory, open '/data/package.json'....
Read more >
Unable to find path of package.json - Visual Studio Feedback
i need to create CI pipeline in Azure devops but the pipeline is failing with error as package.son is not able to find....
Read more >
What does the warning WARN unable to find package.json ...
Describe the bug I receive the warning in the console every time i start a storybook for a library I'm creating: WARN unable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found