This repository was archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
This repository was archived by the owner on May 10, 2024. It is now read-only.
Webpack 4 Error: ENOENT: no such file or directory, scandir '//grant' #175
Copy link
Copy link
Open
Labels
Description
Hello,
I'm trying to build my bundle with webpack and I have this issue :
fs.js:904
return binding.readdir(pathModule._makeLong(path), options.encoding);
^
Error: ENOENT: no such file or directory, scandir '//grant'
at Object.fs.readdirSync (fs.js:904:18)
at Object.<anonymous> (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:87772:4)
at Object.<anonymous> (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:87807:30)
at __webpack_require__ (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:20:30)
at Object.<anonymous> (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:87695:18)
at __webpack_require__ (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:20:30)
at Object.NODE_ENV (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:87461:13)
at __webpack_require__ (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:20:30)
at Object.<anonymous> (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:128:16)
at __webpack_require__ (/Users/robincomadelperier/Documents/Workspace/airbus-helicopters/webtek-api/dist/bundle.js:20:30)
My main.ts is really simple :
import * as osprey from 'osprey';
import * as express from 'express';
import * as path from 'path';
const app = express();
const printableError = (e) => {
return `
${e.code} (${e.path} Li ${e.range.start.line}, Col ${e.range.start.column}) :
${e.message}
`;
}
console.log(path.join(__dirname, 'assets', 'api.raml'))
osprey.loadFile(path.join(__dirname, 'assets', 'api.raml'), {})
.then((middleware: any) => {
app.use(middleware)
app.use(function (err: any, req: Request, res: Response, next: Function) {
console.error(`Error: ${err.message}`);
})
app.listen(3000);
})
.catch((err: any) => {
console.error(`Error in the RAML of JSON SCHEMAS types :`);
err.parserErrors.forEach((e) => {
console.log(printableError(e));
});
});It seems to be the import of osprey, I try const osprey = require('osprey') but same error.
Any Ideas ?
robinComa