Questions tagged [package.json]
All npm packages contain a file, usually in the project root, called package.json. This file holds various metadata relevant to the project. This file is used to give information to npm that allows it to identify the project as well as handle the project's dependencies.
2,884
questions
0
votes
1
answer
49
views
What does the ^ ahead of a software version number mean? [duplicate]
I am thinking of updating a package in my app specifically I am updating "@types/react-router-dom": "4.3.1" to "5.0.0" but its in a giant project and I am afraid to break ...
0
votes
0
answers
10
views
Error on frontend - OmitEventHandler.d.ts
I am working with a react-typescript frontend. This is my package.json for the project:
{
"name": "Feature-Toggles",
"homepage": ".",
"version": ...
0
votes
1
answer
27
views
an issue of installing ngx-bootstrap with Angular 14 (Package "ngx-bootstrap" was found but does not support schematics)
I'm having a problem install ngx-bootstrap with angular 14
the package.json as follows:
{
"name": "testproj",
"version": "0.0.0",
"scripts": {
...
-1
votes
0
answers
17
views
I have an issue displaying configuration of vscode configuration in extension development
While developing an vscode extension, I'd like to display the configuration of extension in settings panel (file -> preferences -> settings -> extensions -> myextension)
I'd like to add a ...
0
votes
1
answer
34
views
ERR! notarget No matching version found for elements@~0.1.2
I'm fairly new to angular and I'm trying to install packages by running 'npm install' but getting this error and am unsure how to resolve:
npm ERR! notarget No matching version found for elements@~0....
0
votes
0
answers
14
views
error: Cannot find module 'postcss' heroku
The website works fine on local, but it fails to deploy on Heroku with a very common error. I am using direct deploy from Github.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot ...
0
votes
0
answers
17
views
async module apprears in package-lock and not appear in package.json
my project works but eslint show an err-message: 'async should appear in package.json dependencies'.
async appear in package-lock and not appear at package.json dependancies and I don't get how can it ...
-1
votes
0
answers
30
views
Cannot fix vulnerabilities in node packages with audit fix, ncu script or manual updates
I've tried use the force fix commands and I've fumbled around in the node docs to walkthrough the update commands and I still have these vulnerabilities that are "looking for funding". The 2 ...
0
votes
0
answers
25
views
yarn install won't upgrade package version when using next tag
I'm not sure wether or not yarn install should UPGRADE a package that has a next tag on it, I'm going to write down a couple of information so that you have context to understand what I mean:
Here we ...
0
votes
0
answers
24
views
React - unable to run app using ip from "On your network"
Currently, I'm working on an ongoing project and I want to try accessing/debugging app on mobile devices, but when I try to go the ip mention in "On your network" it forwards my ip from http:...
0
votes
0
answers
18
views
package.json exports and multiple type declaration file
I am trying build a TypeScript library and want to export using exports field in package.json.
From nodejs and webpack's documentation, I saw that exports is the recommended way to export modules.
...
-1
votes
1
answer
19
views
How to build angular library with peerDependencies
I am struggling building my angular library "@myproject/auth" which has a peerDependency on "@myproject/utilities".
When adding "@myproject/utilities" to my "@...
0
votes
0
answers
45
views
With Node ES6 how to run export default from package.json script?
Given a file named weekday.js in my src directory of:
#! /usr/bin/env node
export const mon = () => console.log('Monday')
export const tues = () => console.log('Tuesday')
export const wed = ()...
1
vote
1
answer
37
views
Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. 2022 problem
I know that a similar question has already been asked here, but it's already about 5 years old... So the information from there couldn't help me and I decided to create a new topic on this problem for ...
0
votes
0
answers
51
views
ENOTDIR: not a directory node_modules/.staging/@types/node-16824c86/package.json
It error When I run docker exec -t [image] npm run production.
npm WARN ws@8.2.3 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm ERR! Linux 4.10.0-35-generic
npm ERR! argv "/...
0
votes
0
answers
12
views
Create-react-app create Blank package.json
I created a react app using yarn and create-react-app.
But package.json in my app is empty.
When I run yarn start, it give me an error
Usage Error : Invalid package.json in package.json
Can I do ...
0
votes
0
answers
19
views
why are the icons a dev dependency?
The instructions for how to install Material Design Icons in a Vuetify app are
$ yarn add @mdi/js -D
// OR
$ npm install @mdi/js -D
The -D flag indicates that the icons should be installed as a ...
-3
votes
1
answer
31
views
How can I uninstall node from my project? [closed]
Let's say I'm coding e react project. I finished temporarily and would like to keep the project locally but without ocupying a lot of storage space in my computer. Is there any way that I can ...
0
votes
0
answers
9
views
parcel and commit hooks when using package.json#targets
I'm using parcel and configuring targets in package.json.
is there a way to intersect the instructions from package.json with a file glob and have it build just those files?
I'm also using commit ...
1
vote
0
answers
36
views
Can I import variables from a .js file into package.json?
I have multiple package.json files that use the same set of values, so I would like to define these values as variables in a .js file, and share the file between the package.json files.
I am wondering ...
1
vote
1
answer
22
views
Dependency conflict between angulartics2 and rxjs
I have the following dependencies in my package.json :
"dependencies": {
"@angular/animations": "~12.1.0",
"@angular/common": "~12.1.0",
"@...
0
votes
1
answer
21
views
Is there any way to specify the target resolution for a specific dependency in webpack?
Lets suppose our dependency has the following package.json described as:
{
"name": "some-dependency",
"exports": {
".": {
"browser": {
...
0
votes
1
answer
22
views
How to create a prompt with options after yarn start
I'm working within a repo that has two React apps installed in a subfolder. A developer chooses which project to run by entering yarn app-1 or yarn app-2.
yarn start is currently unused. If a ...
0
votes
0
answers
51
views
You need to enable JavaScript to run this app. Vercel
I just published my React app to vercel, the problem occurs when I make a call from my API, when I see the response from the server "Network" I get this error "You need to enable ...
0
votes
2
answers
71
views
ERR_PACKAGE_PATH_NOT_EXPORTED with firebase-admin 11.0.0 and firebase-functions 3.21.2
I'm trying to update to the most recent versions of firebase-admin (11.0.0) and firebase-functions (3.21.2). I'm using firebase-tools 11.1.0. I get this error when try to deploy my functions:
Error: ...
0
votes
1
answer
27
views
Docker build command can't find package.json
In my Dockerfile in docker/my-project-node/ folder I have RUN npm i --legacy-peer-deps --only=production --no-optional.
I want to run docker build locally and see if everything works fine.
When I run ...
0
votes
0
answers
8
views
How to update dependencies for a 2 year old GitHub repo?
I have worked on a react web project in Q1/2020. Since then, the project has been unworked and unchanged in Github. Now I pulled it again and wanted to update my dependencies via "npm audit fix --...
0
votes
1
answer
28
views
Remove dependency completely from Npm
I wanna remove some dependencies completely from my project i.e package.json, package-lock.json
Package.json
{
"name": "application",
"version": "0.0.0",
&...
0
votes
1
answer
20
views
Installed npm packages without npm init
I forgot to initialize npm by "npm init" and then installed other npm packages like express,ejs etc. inside my current project directory.
Where are these packages stored since no package....
-1
votes
1
answer
108
views
Unexpected errror : npm WARN config shrinkwrap. Use the --package-lock setting instead
I am getting this warning message though I am building the application successfully. This is the application I am migrating from angular 7 to 13 and getting this error during Angular version 10 to 11 ...
1
vote
0
answers
19
views
How to configure package.json for a package to use the latest version?
I want to install a package with the latest version whenever I run npm install without specifying a version. e.g. react-datepicker in the following file.
{
"name": "example",
...
0
votes
0
answers
15
views
Can I put a dependency in both dev and peer dependencies?
I am writing a library using vue. Thus I would like to put vue as a peer dependency.
However, nowadays some package managers (pnpm for instance) do not install peer dependency by default when running ...
0
votes
0
answers
12
views
How to handle project version?
Does anyone know how to automatize app version upgrading?
I have to update it in package.json on each chganged.
Merge to main can be a triger, or simple comand in termianl.
Maby vsc has plugin to do ...
-1
votes
2
answers
41
views
How do I use newly installed modules in React when they do not appear in the package.json "dependencies" list?
[Updated my question to give more details]
I am quite new at working with React so this maybe a basic question. I installed several modules I will use one as an example for clarity which was @react-...
0
votes
1
answer
66
views
start script not working with npm start, but works fine with node server.js
I have been stuck on an issue for quite some time and cannot seem to figure out what I am doing wrong. When I cd into my project's src folder and run node server.js everything works as expected. I am ...
0
votes
0
answers
13
views
When does bundled dependencies get creates in a node project?
Is there a command script (ex. npm pack) that automatically adds the "bundled-dependencies" dependency automatically to the package.json? Or where in the packing stages does it happen (if it ...
1
vote
0
answers
69
views
Digital Ocean app deployment error: package and package-lock are not in sync running npm ci
I've been trying to deploy my app into a digital ocean app here, but for the past days, the app hits a fatal error saying:
[2022-06-13 07:11:31] npm ERR! `npm ci` can only install packages when ...
-1
votes
1
answer
39
views
composer version issue in my laravel project
Hello I want to add some feature for my laravel project and so I must add some requirement in composer file. However after I added my reqs I see this error code. How can I solve this problem? Can I ...
0
votes
0
answers
40
views
rollup plugin "@rollup/plugin-commonjs" parsing package.json and throwing unexpected token error
TL;DR: Why is @rollup/plugin-commonjs looking in my package.json and how can I stop that so that I don't have to include @rollup/plugin-json arbitrarily to fix the problem?
I have a file written in JS ...
0
votes
0
answers
29
views
Package.json - set main directory
I'm building a library with no default export, but a whole set of sub-exports. It's documentation for a set of APIs, so each API is exported from its own sub-directory. There is no central API info ...
0
votes
0
answers
22
views
what configuration should use to create npm package which works with normal js/angular/react or others
tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonJS",
"rootDir": "./src",
&...
0
votes
0
answers
14
views
How can i fix project dependency tree problem in react?
I have installed react-spring and 'npm audit fix --force'. Then i can't start my react project. It shows me 'There might be a problem with the project dependency tree'. How can i solve this problem?
1
vote
0
answers
33
views
Split Installations for Package.json
After a lot of research, it looks like Classic Yarn does not support installing private registry packages.
I have an PAT (Personal Access Token) set for my auth token and listed the private registry ...
0
votes
1
answer
40
views
Grep package.json dependency versions and interpolate them in a MakeFile
I am trying to get the current dependencies and devDependencies versions that are set in the package.json file so that when the MakeFile is run for a new user, it installs the versions listed there ...
0
votes
0
answers
53
views
I have problem with GULP "Error: Cannot find module 'gulp-sass' "
My PC macOS Monterey version 12.4
MacBook Air (M1, 2020)
Apple M1
The problem occurs when i download the repo. I run the command in terminal "npm install". Then i types the "gulp" ...
0
votes
1
answer
52
views
npm ERR! Error: EPERM: operation not permitted, when trying to install any package
Whenever tying to install any type of package I getting this error (errno -4048) operation not permitted. looking for a solution tried to kill any running server but the issue presists. Do you have an ...
0
votes
1
answer
68
views
Why are certain conflicting peer dependencies resolved when you remove the package-lock.json and node modules
Context
I joined a new project where I was asked to upgrade React from version 17 to 18. After upgrading react and react-dom and some other dependencies I got some warnings, which had to do with ...
0
votes
1
answer
24
views
Trouble running package.json commands
I am trying to run some commands I wrote in my package.json to test environment variables. However, when I try to run them in the Node.js command prompt, it throws me an error.
My package.json looks ...
0
votes
1
answer
63
views
Having a lot of 'Module not found' errors for react project
I was building my application no problem and all of a sudden I had a problem concerning all these modules not found. It is important to note that I am using react-rewired to handle webpack v5 and the ...
1
vote
0
answers
28
views
Can the NPM registry be removed from package-lock.json file?
I work behind a corporate Firewall, So I have to set a registry in npm like
npm config set registry https://aa-artifactory.abc.com/artifactory/api/npm-repo/
I have now finished building my app and ...