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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

Issue with Path Aliasing using "imports" in package.json - Error [ERR_MODULE_NOT_FOUND]

I am facing difficulties implementing path aliasing using the imports field in the package.json file. Despite my efforts, I keep encountering the following error: Error [ERR_MODULE_NOT_FOUND]: Cannot ...
anubhav adarsh's user avatar
0 votes
1 answer
12 views

Webpack cannot resolve /index.(js|jsx) files when package is type module

I'm pretty new to Webpack configuration and difference between cjs, mjs etc. When trying to build a component lib bundled by Webpack, im coming across this error when building (webpack command) ...
Coni Wright's user avatar
0 votes
1 answer
19 views

Troubleshooting 'npm run generate:types' Command Issue

so i get an error by doing npm run generate:types : PS C:\Users\hacke\complete_fullstack_digital_marketplace_app> npm run generate:types > [email protected] ...
Rene Pungartnik's user avatar
1 vote
2 answers
28 views

How can one expose only the package.json version in an Angular 17 application?

I have a package.json with a version I want to be able to display on the UI of my web application. The issue I run into when importing the package.json is that it will expose the entire contents of ...
greenintro's user avatar
0 votes
1 answer
22 views

React Native expo build failed

(https://i.stack.imgur.com/POoIL.png)(https://i.stack.imgur.com/GzvZE.png) HOW TO SOLVE THIS PROBLEM? When I running eas build -p android --profile production the build always failed. I already ...
user23065802's user avatar
0 votes
0 answers
9 views

NUXT: why is my prisma entry changed in package.json when running npm build?

I want to deploy a Nuxt3 app that uses an API that itself uses prisma. In my original package.json I have "dependencies": { ... "prisma": "^5.7.0", ... } ...
Meaulnes's user avatar
  • 405
0 votes
1 answer
13 views

Error: Cannot find native module 'ExpoBarCodeScanner' in React native (v 0.64.3)

I've been working on a legacy react native project (react native version 0.64.3) and I'm trying to install the library expo-barcode-scanner, but after installation if I import the package, it is ...
Abhishek Dvs's user avatar
1 vote
1 answer
22 views

'Renderer is declared here' error when trying to upgrade from Angular Version 8.X to any newer version

I'm getting a Renderer error when trying to upgrade from Angular 8.X to any higher version. I've tried 9.X and 15-17.X. I don't think just changing the file in the node_modules will work, so is there ...
SecureEntrepeneur 's user avatar
0 votes
0 answers
46 views

Expo-doctor --fix-dependencies not working deprecationWarning: The `punycode` module is deprecated

Expo doctor FIX dependencies not working npx expo-doctor --fix-dependencies (node:11556) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (...
samsamradas's user avatar
0 votes
0 answers
5 views

How to read commands from a file in npm script

What I have: "scripts": { "postinstall": "prisma migrate deploy; prisma generate; … <and the line goes on forever> is there some way for scripts to read the ...
Arno Teigseth's user avatar
0 votes
0 answers
21 views

Using multiple node_modules

In a React.js project I have 2 node_modules folders, one of them is in the root folder, and one of them is in the client folder. The node_modules folder in the root folder is related to the server, ...
Ehsan Aryan's user avatar
1 vote
0 answers
23 views

Angular peerDependencies for libraries using Angular 12+

Since Angular v12, a library is able to be on a lower version of Angular than the application that uses the library, but the application must be on a version the same version or higher than the ...
Get Off My Lawn's user avatar
0 votes
0 answers
23 views

running/serving an angular app in test environment with test flag

i am able to use ng serve -c test on local. how do i serve the app in test and production machines specifying test configuration? i have changed pipeline yml to 'npm run build' n changed 'scripts': ...
user1914725's user avatar
0 votes
1 answer
56 views

Cannot find module react-scripts

In package.json file I have these scripts: "scripts": { "server": "json-server --watch db.json --port 5000", "client": "npm start --prefix client&...
Ehsan Aryan's user avatar
0 votes
0 answers
30 views

How to build my type script component(hook) with ESnext and CommonJS to publish this to npm?

my build script is this: "clean": "rimraf dist", "tsc-build": "npm run clean && tsc --p tsconfig.json --module esnext && tsc --p tsconfig.json --...
nayounsang's user avatar
0 votes
0 answers
34 views

config @wordpress/scripts with webpack and postCSS features

I using wordpress as CMS and I want to config @wordpress/scripts with webpack and adding PostCSS and it's plugins like: postcss-loader, postcss-import, postcss-simple-vars,postcss-nested, postcss-...
Alipvd's user avatar
  • 71
0 votes
0 answers
37 views

ERROR in ./node_modules/expo-router/_ctx.web.tsx:1:19 Module not found: Can't resolve '..\..\app'

There seems to be some dependencies issues with my node_modules in my expo app. It will not open and throws an error when trying to view it. It was working fine the other day but I believe a package ...
Felix Bolongaro's user avatar
0 votes
0 answers
14 views

My React JS Development Server is not loading, I'm getting these errors while adding "react-showdown dependency"

Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:133:10) at module.exports (D:\NoteApp in ReactJS\my-app\...
Rutaba Shamshad's user avatar
0 votes
0 answers
15 views

How can I easily set up a MERN stack with existing code?

I am attempting to complete a website for my senior project and wish to develop a MERN stack on Ubuntu as I was told to "pick something I have never worked with before that will help in the job ...
Kayla's user avatar
  • 11
-1 votes
0 answers
33 views

Github Pages throws me 404s on manifest.js:1, main.364e1193.css:1 and main.69ef9ed4.js:1

I have a problem, I tried to deploy today my first react project on Github and Github Pages. The Project Runs local without problems but doesn't work on Github Pages. The console throws me errors. I ...
Benedikt Wychert's user avatar
-1 votes
0 answers
35 views

Thorough documentation on package.json configuration, including the various entry points and various module formats

I have been trying to locate accurate and complete documentation on package.json with no luck. I even stumbled upon this question but now all links (but one that is not what it promises) are broken. ...
José Ramírez's user avatar
0 votes
0 answers
28 views

Building Astro Component Library with Tailwind Integration

I'm currently building a project which consists of a component library based on Astro, I want to use Tailwind as well to style the components and export them for use in other projects. I followed both ...
IvanS95's user avatar
  • 5,454
0 votes
0 answers
14 views

How to add forked github repo to package.json

I'm building website using NextJS. I'm looking for draggable tree component and I found interesting one but to support some features, I would need to edit source code. Should I simply clone the entire ...
Kernier's user avatar
0 votes
0 answers
58 views

Not able to load react app build into electron

I'm trying to implement react build file into my electron app and build it into an .exe file. I got stuck up where I'm getting empty screen in my electron app and there are no errors in the console....
JEFF BRO's user avatar
-1 votes
0 answers
64 views

npm not working - "network error failed to ECONNRESET"

C:\Windows\system32>npm install -g yo npm http GET https://registry.npmjs.org/yo npm http GET https://registry.npmjs.org/yo npm http GET https://registry.npmjs.org/yo npm ERR! network read ...
Bilal Younus's user avatar
0 votes
0 answers
50 views

Error while doing node package installation using any Package Manager

I've ever tried to do this kind of thing for a while. But it starts throwing me error since 2 days ago. I don't really know what happened. I'm using Windows 11. At first, I was using npm and pnpm. ...
Senzawa's user avatar
1 vote
1 answer
27 views

Handling environmental variables in package.json

Hello Stack Community, I'd love to achieve something as simple as: "loadKey": "export GITLAB_KEY=123 || set GITLAB_KEY=123", "echoKey": "echo ${GITLAB-KEY}&...
Tomas's user avatar
  • 3,291
-1 votes
1 answer
39 views

npm refuses to generate package-lock.json

If I update a dependency manually in the package.json or "automatically" (by installing a package through npm CLI) both methods do not update the package-lock.json leaving me with a broken ...
MarcelTon's user avatar
0 votes
0 answers
30 views

Angular Universal - On "npm run dev:ssr" facing node_module issue

I installed "Angular Universal" in my project, which originally ran on Angular version 11. Upon attempting to execute "npm run dev:ssr," I encountered an issue within the "...
Vijay Anandh's user avatar
-1 votes
0 answers
36 views

When using package.json script it gives Error: Cannot find module 'typescript'

I am trying to use ts-node and ts-node-dev for my project. I have made a start script in package.json. { "scripts": { "test": "echo \"Error: no test specified\"...
DjBillje Official's user avatar
0 votes
0 answers
37 views

"No export named Button" error for npm package with Vite

I have npm package as reproduced here: https://stackblitz.com/github/bentaly/components-test/ From: https://github.com/bentaly/components-test When I add this package to a Vite/React/Typescript ...
Ben Taliadoros's user avatar
0 votes
1 answer
36 views

After npm install I don't have correct version

In my package.json I have "my-package": ^3.2.1. I did some changes and I have tag on my-package 3.2.8. But after I run npm install rm -rf package-lock && rm -rf node_modules &&...
Martin54's user avatar
  • 1,409
0 votes
1 answer
40 views

running yarn fails to build after updating node version

I've updated my node version from 14 to 18 and now I'm seeing build errors around node_sass. I've updated node_sass to v8 in my package.json file, removed the node_modules folder and yarn.lock file ...
SlugLord's user avatar
  • 143
0 votes
0 answers
13 views

(invalidPackageJSON, @testing-library/react)

that I need to add package.json mui in my react project and then error with @testing-library/react": "^13.4.0 "name": "react-test", "version": "0.1.0&...
Benz's user avatar
  • 1
0 votes
1 answer
15 views

.js suffix rules on file path specifiers in subpath exports clauses in package.json?

In subpath clauses in the package.json exports field, is .js suffix required on the right hand side file path specifiers? I was earlier told the spec says so, but when I read that spec, https://nodejs....
jakob gaardsted's user avatar
0 votes
1 answer
34 views

Why can't I run `npm install`?

I am trying to complete a project provided by Codecademy's Web Development Skill Path called "Gold Metal Metrics". The goal is to build a web app that uses SQLite. They provide some starter ...
MB1721's user avatar
  • 3
0 votes
1 answer
101 views

Parsing error after updating dependencies

I was updating some packages in my React Project and I needed to update the typescript version, the problem is that I started receiving the following error Parsing error: DeprecationError: '...
Luis Verola's user avatar
0 votes
1 answer
33 views

React - Folder Structure - Package-lock.json [duplicate]

We have the Package.json file which consist of the dependencies which are used in our source but why another file Package-lock.json is there which also consist of several versions of our dependencies ...
Bv2124's user avatar
  • 31
0 votes
1 answer
41 views

Manually set up library version for Angular project created with `ng new`

I used Node v18.18.2 and @angular/[email protected] to create an Angular project with ng new command. rxjs ~7.8.0 appears in package.json "dependencies": { "@angular/animations": &...
rhbc73's user avatar
  • 739
0 votes
0 answers
14 views

Next dev with yarn doesn't work on freshly created app

I created a new app with nextJS. When I try to launch dev server with yarn dev with Webstorm, this appears: $ yarn dev yarn run v1.22.18 $ next dev Done in 21.44s This issue is specific to this ...
Horkos's user avatar
  • 231
0 votes
0 answers
34 views

Couldn't update Dependency packages using npm

I am beginner in Node and Vue , i recently cloned a vue project and tried to run it using npm ci or npm install but it kept showing npm warn depreciated error and 4 moderate severity vulnerabilities ...
Abhishek's user avatar
-1 votes
2 answers
29 views

Common node_modules directory for all projects

So I've been coding for a while, and have created a bunch of projects. Each of them has its own node_modules directory and it takes so much space. Is it a good practice to set one global directory for ...
WojciechZ04's user avatar
0 votes
1 answer
74 views

Unable to use Swiper.js v11 with VUE.JS v3 : dependency was not found

I'm working on a vue.js V3.0.0 project, and would like to use swiper.js. As long as I'm trying to import swiper package with "sub-folder" package (import Swiper from 'swiper/element/bundle'; ...
Pof's user avatar
  • 889
0 votes
1 answer
65 views

pnpm publish not respecting "files" field in package.json

I've encountered an odd behavior with pnpm when publishing my package. Even though I've clearly specified the "files" field in my package.json, it seems that pnpm is bundling all files from ...
Wojciech Król's user avatar
0 votes
0 answers
72 views

Vue/Vite won't find my custom package when I import it locally

I'm trying to create a custom package to my project and import it via npm locally. I'm using vite-plugin-dts to make my .d.ts files, but when I import my component to use in my Vue file, I keep ...
Nats's user avatar
  • 49
0 votes
0 answers
43 views

How to run package dependency with yarn in the console? Like npx tsc init for npm package.json with typescript dependency?

I know node_modules folder does not exist when using yarn and instead there is a .yarn/cache folder where the dependencies go. I have tried using yarn dlx tsc init and npx tsc init thinking they might ...
uzair's user avatar
  • 1
1 vote
2 answers
135 views

Packing React App: Support for the experimental syntax 'jsx' isn't currently enabled

I'm trying to package app "x" and use that in another app "y". Here's my setup: x/package.json: { "name": "x", "version": "0.0.1", &...
Bob Sacamano's user avatar
0 votes
0 answers
56 views

Not allowed to load local resource: file:///dist/index.html

I tried to build my desktop app using electron-builder, the app is built but there is an error Not allowed to load local resource: file:///dist/index.html This is my electron config const { app, ...
atanasius herkristito's user avatar
0 votes
1 answer
215 views

Unsupported Node.js engine error for @es-joy/jsdoccomment and eslint-plugin-jsdoc

I'm trying to install or update the npm packages @es-joy/jsdoccomment and eslint-plugin-jsdoc, but I'm encountering "Unsupported engine" warnings related to the required Node.js versions. ...
theaminuldev's user avatar
1 vote
1 answer
37 views

How to create a single npm package for common libraries to be used across different projects?

There are several projects that use the same react ecosystem libraries (react, react-dom, react-router, react-redux etc). Currently each project maintains the versions of these libs individually. I ...
Nashit Shayan's user avatar

1
2 3 4 5
70