I have package.json which is below Now, I want to update “name” from b to new-b. How can I do that programmatically? I tried npm config set command, but it does not update package.json file Please let me know Thank you Answer If you’re trying to use the CLI to modify the package properties, you should be able to use
Tag: package.json
SyntaxError: Cannot use import statement outside a module
I’ve got an ApolloServer project that’s giving me trouble, so I thought I might update it and ran into issues when using the latest Babel. My “index.js” is: And when I run it I get the error First I tried doing things to convince TPTB* that this was a module (with no success). So I changed the “import” to a
Node engine 8.x or 10.x in package.json
I tried to specify the node engine in a package.json to accept both 8 and 10 version. I tried to type this: But running yarn results in: The engine “node” is incompatible with this module. Expected version “8.x|10.x” If I replace with: … it works (i.e no error). Is there a way to accept two versions of node engine in
How to remove folder with npm before build
I’ve got a scripts “build”: “rimraf dist webpack –progress –config webpack/prod.js”, But actually,it removed not dist but all file inside webpack folder. But I need delete only dist Answer Npm scripts are basically the same as running the commands directly in bash. In your case, you are running rimraf dist webpack which means webpack is an argument for rimraf. To