I clone ant-design in github and want to run it according to the official guide.but it could't work.
the error :
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:140:9)
at Object.fs.writeFile (fs.js:1258:14)
at module.exports (/Users/sufang/ant-design/node_modules/_bisheng-plugin-antd#0.16.3#bisheng-plugin-antd/lib/process-demo.js:142:8)
at module.exports (/Users/sufang/ant-design/node_modules/_bisheng-plugin-antd#0.16.3#bisheng-plugin-antd/lib/node.js:14:12)
at /Users/sufang/ant-design/node_modules/_bisheng#0.28.3#bisheng/lib/utils/source-data.js:210:30
at Array.reduce (<anonymous>)
at Object.exports.process (/Users/sufang/ant-design/node_modules/_bisheng#0.28.3#bisheng/lib/utils/source-data.js:209:32)
at process.<anonymous> (/Users/sufang/ant-design/node_modules/_bisheng#0.28.3#bisheng/lib/loaders/common/worker.js:13:35)
at process.emit (events.js:182:13)
at emit (internal/child_process.js:807:12)
can anyone know how to resolve this problem? thank you!
It should be fixed in https://github.com/ant-design/bisheng-plugin-antd/commit/2f6c5db91ebe352017ae989cdd03cc46845e0573 by now. Try reintall node_modules and start again.
Related
When i installed latest twilio's version which is "twilio": "^4.7.2", and building the project (npm run build) the following error occurs,
node_modules/twilio/lib/base/BaseTwilio.d.ts:22:19 - error TS2304: Cannot find name 'Headers'.
22 headers?: Headers;
~~~~~~~
Found 1 error in node_modules/twilio/lib/base/BaseTwilio.d.ts:22
My node version : v16.18.1
Npm version : v8.19.2
I got the same issue once I installed the twilio npm package of the exact same version ^4.7.2. I'm assuming it's some typescript compilation issue. And there is a trick that you can use to make it work.
Add this in your tsconfig.json:
{
"compilerOptions": {
"skipLibCheck": true,
}
}
This will solve your issue, but don't consider it as a fix. It's rather workaround.
P.S. This will also speed up your overall typescript compilation process.
I'm trying to set up a playwright script to take some screenshots and I've been getting this error:
[Error: EPERM: operation not permitted, scandir 'c:\users\myname\appdata\local\elevateddiagnostics'] {
errno:-4048,
code: 'EPERM',
Syscall: 'scandir',
path h:'c:\\users\\myname\\AppData\\Local\\ElevatedDiagnostics'
}
Currently none of my test scripts are working, including the example one. What might the problem be?
I had a similar problem.
npm init playwright#latest
solved the problem for me.
This is an older Yeoman generator that was setup using this.copy
this.copy('_editorconfig', '.editorconfig');
ERROR: AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: _editorconfig
The fix was due to changes in the way copy was handled.
this.fs.copy(
this.templatePath('_editorconfig'),
this.destinationPath('.editorconfig')
);
As a note this also was a fix for adding a gitignore
this.fs.copy(
this.templatePath('_gitignore'),
this.destinationPath('.gitignore')
);
I have the following code in my TS file...
require("jquery-ui/ui/widgets/datepicker.js");
require("angular-ui-date/dist/date.js");
When I run the code I get the following error...
Module not found: Error: Cannot resolve module 'jquery-ui/datepicker' in //code/my-app/node_modules/angular-ui-date/dist
# ./~/angular-ui-date/dist/date.js 3:66-97
So I ran tsd install jqueryui --save and then added the following to the same file as the require...
/// <reference path="../../../typings/jqueryui/jqueryui.d.ts" />
based on src/main/typescripts but I still get the same warning when running webpack
It seems to be a issue with latest version you are using. It has nothing to do with type definition. if you open angular-ui-date/dist/date.js you will find that it is requiring
require("jquery-ui/datepicker")
which does not exist
to workaround you could change it manually to require("jquery-ui/ui/widgets/datepicker") but that's a ugly solution i think.
There is also an issue on github and there is also suggestion for workaround
Please see the isse here
I added an alias to the resolve object in the webpack configuration file.
'resolve' : {
'alias' : {
'jquery-ui/datepicker' : 'jquery-ui/ui/widgets/datepicker'
},
},
I am trying to use PHP_CodeSniffer in my Hack project. I tried getting the phpcs.phar file from the repository and run it, but I get an error, something that seems to be a bug of HHVM (see #5140). So I tried building it to .phar myself. I ran the most obvious script:
scripts/build-phar.php
so
$ hhvm ./scripts/build-phar.php
This is the output I get:
Building phpcs phar
=> /devel/phpcs/phpcs.phar
Fatal error: Uncaught exception 'PharException' with message '/devel/phpcs/phpcs.phar is not a file' in /devel/phpcs/scripts/build-phar.php:43
Stack trace:
#0 /devel/phpcs/scripts/build-phar.php(43): Phar->__construct()
#1 {main}
I am not sure where to look or what to look for here. Could you please give me some advice on building a .phar from this?