Louis Barclay
11/01/2021, 5:54 PMThe system cannot find the path specified.), perhaps because node_modules is not recognized as a directory due to being in .gitignore. Possible I am making a basic mistake.
My use case is:
• Want to deploy a NextjsSite from a separate repository, which I have installed into node_modules
• That'll let me be able to develop the separate repository cleanly - I'll update it when I need to - instead of having to have the whole source code for my Next.js app inside the sst project
import * as sst from "@serverless-stack/resources";
export default class MyStack extends sst.Stack {
constructor(scope, id, props) {
super(scope, id, props);
// Create a Next.js site
const site = new sst.NextjsSite(this, "cloakist-notion-nextjs", {
path: "node_modules/cloakist-notion-nextjs",
environment: {
// Pass the table details to our app
REGION: scope.region,
},
});
// Show the site URL in the output
this.addOutputs({
URL: site.url,
});
}
}thdxr
11/01/2021, 5:57 PMFrank
node_modules/cloakist-notion-nextjs directory exist?Frank
The system cannot find the path specified. error?Louis Barclay
11/02/2021, 12:18 PMLouis Barclay
11/02/2021, 12:19 PMLouis Barclay
11/02/2021, 12:20 PMFrank
Frank
node_modules/@serverless-stack/resources/dist, open up NextjsSite.js, and look for the buildApp() function.Frank
cmd and sitePath. And we can try running the command in the terminal and see if we get the same result.Louis Barclay
11/03/2021, 12:06 AMUsing stage: dev
Preparing your SST app
Transpiling source
Linting source
sitePath: node_modules/cloakist-notion-nextjs
cmd: node C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\@serverless-stack\resources\assets\NextjsSite\build.js --path C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\cloakist-notion-nextjs --output C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\.build\node_modules-cloakist-notion-nextjs-1635897945421 --config eyJjd2QiOiJDOlxcVXNlcnNcXGxvdWlzXFxEb2N1bWVudHNcXERldlxcQ2xvYWtpc3RcXGNsb2FraXN0LXNvdGlvblxcbm9kZV9tb2R1bGVzXFxjbG9ha2lzdC1ub3Rpb24tbmV4dGpzIiwiYXJncyI6WyJidWlsZCJdfQ==
Building Next.js site node_modules/cloakist-notion-nextjs
The system cannot find the path specified.
(node:28336) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(),
or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: There was a problem building the "cloakist-notion-nextjs" NextjsSite.Louis Barclay
11/03/2021, 12:06 AM!fs.existsSync(sitePath) test. The error message 'The system cannot find the path specified.' is not coming from this file, not sure where it's coming fromLouis Barclay
11/03/2021, 12:10 AMLouis Barclay
11/03/2021, 12:12 AMLouis Barclay
11/03/2021, 12:13 AMUsing stage: dev
Preparing your SST app
Transpiling source
Linting source
reaches here
sitePath: node_modules/cloakist-notion-nextjs
cmd: node C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\@serverless-stack\resources\assets\NextjsSite\build.js --path C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\cloakist-notion-nextjs --output C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\.build\node_modules-cloakist-notion-nextjs-1635898345162 --config eyJjd2QiOiJDOlxcVXNlcnNcXGxvdWlzXFxEb2N1bWVudHNcXERldlxcQ2xvYWtpc3RcXGNsb2FraXN0LXNvdGlvblxcbm9kZV9tb2R1bGVzXFxjbG9ha2lzdC1ub3Rpb24tbmV4dGpzIiwiYXJncyI6WyJidWlsZCJdfQ==
Building Next.js site node_modules/cloakist-notion-nextjs
The system cannot find the path specified.
(node:412) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: There was a problem building the "cloakist-notion-nextjs" NextjsSite.Louis Barclay
11/03/2021, 12:16 AMLouis Barclay
11/03/2021, 12:17 AMnode C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\@serverless-stack\resources\assets\NextjsSite\build.js --path C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\cloakist-notion-nextjs --output C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\.build\node_modules-cloakist-notion-nextjs-1635898523183 --config eyJjd2QiOiJDOlxcVXNlcnNcXGxvdWlzXFxEb2N1bWVudHNcXERldlxcQ2xvYWtpc3RcXGNsb2FraXN0LXNvdGlvblxcbm9kZV9tb2R1bGVzXFxjbG9ha2lzdC1ub3Rpb24tbmV4dGpzIiwiYXJncyI6WyJidWlsZCJdfQ==Louis Barclay
11/03/2021, 12:18 AMThe system cannot find the path specified.Louis Barclay
11/03/2021, 12:18 AMLouis Barclay
11/03/2021, 12:20 AMLouis Barclay
11/03/2021, 12:26 AMLouis Barclay
11/03/2021, 12:29 AMnode C:\Users\louis\Documents\Dev\Cloakist\cloakist-api\tools\check-from-emailLouis Barclay
11/03/2021, 12:29 AMLouis Barclay
11/03/2021, 12:31 AMnode "C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\@serverless-stack\resources\assets\NextjsSite\build.js" I get throw new Error("--path parameter is required"); suggesting that this first path is foundLouis Barclay
11/03/2021, 12:34 AMnode "C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\@serverless-stack\resources\assets\NextjsSite\build.js" --path "C:\Users\louis\Documents\Dev\Cloakist\cloakist-sotion\node_modules\cloakist-notion-nextjs" --config eyJjd2QiOiJDOlxcVXNlcnNcXGxvdWlzXFxEb2N1bWVudHNcXERldlxcQ2xvYWtpc3RcXGNsb2FraXN0LXNvdGlvblxcbm9kZV9tb2R1bGVzXFxjbG9ha2lzdC1ub3Rpb24tbmV4dGpzIiwiYXJncyI6WyJidWlsZCJdfQ== I get throw new Error("--output parameter is required"); , suggesting that the --path is also found. Although then when I run it with --output and without --path it asks for --path, so I think perhaps this is not interesting info