Works from CLI, but not from npm scripts
See original GitHub issueI’ve tried this with a couple commands, and I’m not sure what the issue is, but using npm run
to run a script with copyfiles
in it doesn’t work. The same command as ./node_modules/.bin/copyfiles
works fine
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Istanbul working on command line, but not as npm script
I'm afraid that's not working for me: istanbul is installed locally so I can't use "istanbul" command; I've tried changing mocha bin ...
Read more >node.js - npx <package> runs on command line but not in ...
1 Answer 1 · After integrating any package without command try "npx run".It will install the missing packages in node modules. · Make...
Read more >npm-run-script
Description. This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts.
Read more >How to run more than one command as part of a npm script
A common scenario: as part of your npm start script, you need to have more than one command run (like webpack --config webpack.server.js...
Read more >Sending command-line arguments to an npm script
If you need something really custom, though, “npm scripts” are the way to go. You might have used this for your “build” or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
WOOOW. I spent three hours having this issue with 5 different modules, and it’s all because I wasn’t using quotes. I cannot believe how hard it was to find this fix. Thanks guys, seriously.
Using escaped double quotes in stead of single quotes works for me (windows 7, npm@3.7.1 node@v5.6.0): npm command:
where ‘assets’ is: copyfiles -u 1 "./src/*/+(.eot|.ttf|.woff)" dist
Now to test if it still works on Mac